diff --git a/NzbDrone.Core.Test/MockLib.cs b/NzbDrone.Core.Test/MockLib.cs index 84e6ab923..439a335f5 100644 --- a/NzbDrone.Core.Test/MockLib.cs +++ b/NzbDrone.Core.Test/MockLib.cs @@ -1,5 +1,6 @@ using System; using System.Collections.Generic; +using System.Diagnostics; using System.Linq; using System.Text; using Moq; @@ -22,14 +23,10 @@ namespace NzbDrone.Core.Test - public static IRepository EmptyRepository + public static IRepository GetEmptyRepository() { - get - { - - var provider = ProviderFactory.GetProvider("Data Source=" + Guid.NewGuid() + ".testdb;Version=3;New=True", "System.Data.SQLite"); - return new SimpleRepository(provider, SimpleRepositoryOptions.RunMigrations); - } + var provider = ProviderFactory.GetProvider("Data Source=" + Guid.NewGuid() + ".testdb;Version=3;New=True", "System.Data.SQLite"); + return new SimpleRepository(provider, SimpleRepositoryOptions.RunMigrations); } public static IConfigProvider StandardConfig diff --git a/NzbDrone.Core.Test/QualityProfileTest.cs b/NzbDrone.Core.Test/QualityProfileTest.cs index 9b1f0a676..9e3d0e47f 100644 --- a/NzbDrone.Core.Test/QualityProfileTest.cs +++ b/NzbDrone.Core.Test/QualityProfileTest.cs @@ -2,6 +2,7 @@ using System.Collections.Generic; using System.IO; using MbUnit.Framework; using NzbDrone.Core.Repository; +using NzbDrone.Core.Repository.Quality; namespace NzbDrone.Core.Test { @@ -18,11 +19,11 @@ namespace NzbDrone.Core.Test { //Arrange - var repo = MockLib.EmptyRepository; + var repo = MockLib.GetEmptyRepository(); var testProfile = new QualityProfile { - Cutoff = Quality.SDTV, - Allowed = new List() { Quality.HDTV, Quality.DVD }, + Cutoff = QualityTypes.SDTV, + Allowed = new List() { QualityTypes.HDTV, QualityTypes.DVD }, }; //Act diff --git a/NzbDrone.Core.Test/SeriesTest.cs b/NzbDrone.Core.Test/SeriesTest.cs index 8d374c16e..a9117f939 100644 --- a/NzbDrone.Core.Test/SeriesTest.cs +++ b/NzbDrone.Core.Test/SeriesTest.cs @@ -14,6 +14,7 @@ using NzbDrone.Core.Providers; using NzbDrone.Core.Repository; using SubSonic.Repository; using TvdbLib.Data; +using System.Linq; // ReSharper disable InconsistentNaming namespace NzbDrone.Core.Test @@ -34,10 +35,10 @@ namespace NzbDrone.Core.Test //setup db to return a fake series Series fakeSeries = Builder.CreateNew() - .With(f => f.TvdbId = tvDbId.ToString()) + .With(f => f.TvdbId = tvDbId) .Build(); - moqData.Setup(f => f.Exists(c => c.TvdbId == tvDbId.ToString())). + moqData.Setup(f => f.Exists(c => c.TvdbId == tvDbId)). Returns(true); //setup tvdb to return the same show, @@ -66,5 +67,24 @@ namespace NzbDrone.Core.Test //Verify that the show was added to the database only once. moqData.Verify(c => c.Add(It.IsAny()), Times.Once()); } + + [Test] + + [Description("This test confirms that the tvdb id stored in the db is preserved rather than being replaced by an auto incrementing value")] + public void tvdbid_is_preserved([RandomNumbers(Minimum = 100, Maximum = 999, Count = 1)] int tvdbId) + { + //Arrange + var sonicRepo = MockLib.GetEmptyRepository(); + var series = Builder.CreateNew().With(c => c.TvdbId = tvdbId).Build(); + + //Act + var addId = sonicRepo.Add(series); + + //Assert + Assert.AreEqual(tvdbId, addId); + var allSeries = sonicRepo.All(); + Assert.IsNotEmpty(allSeries); + Assert.AreEqual(tvdbId, allSeries.First().TvdbId); + } } } diff --git a/NzbDrone.Core/Libraries/Castle.Core.dll b/NzbDrone.Core/Libraries/Castle.Core.dll new file mode 100644 index 000000000..34c155ab4 Binary files /dev/null and b/NzbDrone.Core/Libraries/Castle.Core.dll differ diff --git a/NzbDrone.Core/Libraries/ObjectListView.dll b/NzbDrone.Core/Libraries/ObjectListView.dll deleted file mode 100644 index 7efdabbb8..000000000 Binary files a/NzbDrone.Core/Libraries/ObjectListView.dll and /dev/null differ diff --git a/NzbDrone.Core/Libraries/RSS.NET.XML b/NzbDrone.Core/Libraries/RSS.NET.XML deleted file mode 100644 index e60b7797a..000000000 --- a/NzbDrone.Core/Libraries/RSS.NET.XML +++ /dev/null @@ -1,1388 +0,0 @@ - - - - RSS.NET - - - - The contents of a RssFeed - - - Initialize a new instance of the RssFeed class. - - - Initialize a new instance of the RssFeed class with a specified encoding. - - - Returns a string representation of the current Object. - The Url of the feed - - - Reads the specified RSS feed - The url or filename of the RSS feed - The contents of the feed - - - Reads the specified RSS feed - The specified way to connect to the web server - The contents of the feed - - - Reads the specified RSS feed - The cached version of the feed - The current contents of the feed - Will not download the feed if it has not been modified - - - Reads the specified RSS feed - The specified way to connect to the web server - The cached version of the feed - The current contents of the feed - Will not download the feed if it has not been modified - - - Writes the RSS feed to the specified stream. - specified Stream - The Stream cannot be written to. - Feed must contain at least one channel. - Channel must contain at least one item. - - - Writes the RSS feed to the specified file. - The encoding is ISO-8859-1. - The filename is empty, contains only white space, or contains one or more invalid characters. - Access is denied. - The filename is a (null c#, Nothing vb) reference. - The directory to write to is not found. - The filename includes an incorrect or invalid syntax for file name, directory name, or volume label syntax. - The caller does not have the required permission. - specified file (including path) If the file exists, it will be truncated with the new content. - Feed must contain at least one channel. - Channel must contain at least one item. - - - The channels that are contained in the feed. - - - The modules that the feed adhears to. - - - A collection of all exceptions encountered during the reading of the feed. - - - The Version of the feed. - - - The server generated hash of the feed. - - - The server generated last modfified date and time of the feed. - - - Indicates this feed has not been changed on the server, and the local copy was returned. - - - Location of the feed - - - Encoding of the feed - - - Provide information regarding the location of the subject matter of the channel in a taxonomy - - - Base class for all RSS elements - - - Initialize a new instance of the RssElement class - - - Initialize a new instance of the RssCategory class - - - Actual categorization given for this item, within the chosen taxonomy - - - URL of external taxonomy - - - A strongly typed collection of objects - - - Adds a specified channel to this collection. - The channel to add. - The zero-based index of the added channel. - - - Determines whether the RssChannelCollection contains a specific element. - The RssChannel to locate in the RssChannelCollection. - true if the RssChannelCollection contains the specified value; otherwise, false. - - - Copies the entire RssChannelCollection to a compatible one-dimensional , starting at the specified index of the target array. - The one-dimensional RssChannel Array that is the destination of the elements copied from RssChannelCollection. The Array must have zero-based indexing. - The zero-based index in array at which copying begins. - array is a null reference (Nothing in Visual Basic). - index is less than zero. - array is multidimensional. -or- index is equal to or greater than the length of array.-or-The number of elements in the source RssChannelCollection is greater than the available space from index to the end of the destination array. - - - Searches for the specified RssChannel and returns the zero-based index of the first occurrence within the entire RssChannelCollection. - The RssChannel to locate in the RssChannelCollection. - The zero-based index of the first occurrence of RssChannel within the entire RssChannelCollection, if found; otherwise, -1. - - - Inserts a channel into this collection at a specified index. - The zero-based index of the collection at which to insert the channel. - The channel to insert into this collection. - - - Removes a specified channel from this collection. - The channel to remove. - - - Gets or sets the channel at a specified index.In C#, this property is the indexer for the class. - The index of the collection to access. - A channel at each valid index. - This method is an indexer that can be used to access the collection. - index is not a valid index. - - - A reference to an attachment to the item - - - Initialize a new instance of the RssEnclosure class. - - - Where the enclosure is located - - - The size of the enclosure, in bytes - -1 represents a null. - - - A standard Multipurpose Internet Mail Extensions (MIME) type - - - Grouping of related content items on a site - - - Initialize a new instance of the RssChannel class. - - - Returns a string representation of the current Object. - The channel's title, description, or "RssChannel" if the title and description are blank. - - - The name of the channel - Maximum length is 100 characters (For RSS 0.91) - - - URL of the website named in the title - Maximum length is 500 characters (For RSS 0.91) - - - Description of the channel - Maximum length is 500 characters (For RSS 0.91) - - - Language the channel is written in - - - A link and description for a graphic icon that represent a channel - - - Copyright notice for content in the channel - Maximum length is 100 (For RSS 0.91) - - - The email address of the managing editor of the channel, the person to contact for editorial inquiries - - Maximum length is 100 (For RSS 0.91) - The suggested format for email addresses in RSS elements is - bull@mancuso.com (Bull Mancuso) - - - - The email address of the webmaster for the channel - - Person to contact if there are technical problems - Maximum length is 100 (For RSS 0.91) - The suggested format for email addresses in RSS elements is - bull@mancuso.com (Bull Mancuso) - - - - The PICS rating for the channel - Maximum length is 500 (For RSS 0.91) - - - The publication date for the content in the channel, expressed as the coordinated universal time (UTC) - - - The date-time the last time the content of the channel changed, expressed as the coordinated universal time (UTC) - - - One or more categories the channel belongs to. - - - A string indicating the program used to generate the channel - - - A URL, points to the documentation for the format used in the RSS file - Maximum length is 500 (For RSS 0.91). - - - Provides information about an HTTP GET feature, typically for a search or subscription - - - Readers should not read the channel during days listed. (UTC) - Days are listed in the array in the following order: - Monday - Tuesday - Wednesday - Thursday - Friday - Saturday - Sunday - Monday - - - - Readers should not read the channel during hours listed (UTC) - Represents a time in UTC - 1. - - - Allow processes to register with a cloud to be notified of updates to the channel - - - The number of minutes that a channel can be cached. - - - All items within the channel - - - People in a photo - - - A strongly typed collection of objects - - - Adds a specified item to this collection. - The item to add. - The zero-based index of the added item. - - - Determines whether the RssModuleItemCollection contains a specific element. - The RssModuleItem to locate in the RssModuleItemCollection. - true if the RssModuleItemCollection contains the specified value; otherwise, false. - - - Copies the entire RssModuleItemCollection to a compatible one-dimensional , starting at the specified index of the target array. - The one-dimensional RssModuleItem Array that is the destination of the elements copied from RssModuleItemCollection. The Array must have zero-based indexing. - The zero-based index in array at which copying begins. - array is a null reference (Nothing in Visual Basic). - index is less than zero. - array is multidimensional. -or- index is equal to or greater than the length of array.-or-The number of elements in the source RssModuleItemCollection is greater than the available space from index to the end of the destination array. - - - Searches for the specified RssModuleItem and returns the zero-based index of the first occurrence within the entire RssModuleItemCollection. - The RssModuleItem to locate in the RssModuleItemCollection. - The zero-based index of the first occurrence of RssModuleItem within the entire RssModuleItemCollection, if found; otherwise, -1. - - - Inserts an item into this collection at a specified index. - The zero-based index of the collection at which to insert the item. - The item to insert into this collection. - - - Removes a specified item from this collection. - The item to remove. - - - Bind a particular item to this module - Hash code of the item - - - Check if a particular item is bound to this module - Hash code of the item - true if this item is bound to this module, otherwise false - - - Gets or sets the item at a specified index.In C#, this property is the indexer for the class. - The index of the collection to access. - An item at each valid index. - This method is an indexer that can be used to access the collection. - index is not a valid index. - - - Initialize a new instance of the RssPhotoAlbumItemPhotoPeople class - - - Initialize a new instance of the RssPhotoAlbumItemPhotoPeople class - Name of person - - - Add a person to the photo - Name of person - The zero-based index of the added item - - - A collection of photos in a category - - - A strongly typed collection of objects - - - Adds a specified item to this collection. - The item to add. - The zero-based index of the added item. - - - Determines whether the RssModuleItemCollectionCollection contains a specific element. - The RssModuleItemCollection to locate in the RssModuleItemCollectionCollection. - true if the RssModuleItemCollectionCollection contains the specified value; otherwise, false. - - - Copies the entire RssModuleItemCollectionCollection to a compatible one-dimensional , starting at the specified index of the target array. - The one-dimensional RssModuleItemCollection Array that is the destination of the elements copied from RssModuleItemCollectionCollection. The Array must have zero-based indexing. - The zero-based index in array at which copying begins. - array is a null reference (Nothing in Visual Basic). - index is less than zero. - array is multidimensional. -or- index is equal to or greater than the length of array.-or-The number of elements in the source RssModuleItemCollectionCollection is greater than the available space from index to the end of the destination array. - - - Searches for the specified RssModuleItemCollection and returns the zero-based index of the first occurrence within the entire RssModuleItemCollectionCollection. - The RssModuleItemCollection to locate in the RssModuleItemCollectionCollection. - The zero-based index of the first occurrence of RssModuleItemCollection within the entire RssModuleItemCollectionCollection, if found; otherwise, -1. - - - Inserts an item into this collection at a specified index. - The zero-based index of the collection at which to insert the item. - The item to insert into this collection. - - - Removes a specified item from this collection. - The item to remove. - - - Gets or sets the item at a specified index.In C#, this property is the indexer for the class. - The index of the collection to access. - An item at each valid index. - This method is an indexer that can be used to access the collection. - index is not a valid index. - - - Initialize a new instance of the RssPhotoAlbumItemPhoto class - - - Adds a sepecified photo to this collection. - The photo to add. - The zero-based index of the added item. - - - A photo in the category - - - Initialize a new instance of the RssPhotoAlbumItemPhoto class - Date of the Photo - Description of the photo. - Direct link of the photo. - - - Initialize a new instance of the RssPhotoAlbumItemPhoto class - Date of the Photo - Description of the photo. - People to add to the photo. - Direct link of the photo. - - - Adds a specified item to this collection. - Date of the Photo - Description of the photo. - People to add to the photo. - Direct link of the photo. - The zero-based index of the added item. - - - Adds a specified item to this collection. - Date of the Photo - Description of the photo. - Direct link of the photo. - The zero-based index of the added item. - - - Initialize a new instance of the RssPhotoAlbumItemPhoto class - Date of the Photo - Description of the photo. - Direct link of the photo. - - - Initialize a new instance of the RssPhotoAlbumItemPhoto class - Date of the Photo - Description of the photo. - People to add to the photo. - Direct link of the photo. - - - Adds a specified item to this collection. - Date of the Photo - Description of the photo. - People to add to the photo. - Direct link of the photo. - The zero-based index of the added item. - - - Adds a specified item to this collection. - Date of the Photo - Description of the photo. - Direct link of the photo. - The zero-based index of the added item. - - - A collection of categories in a photo album - - - Initialize a new instance of the RssPhotoAlbumItemPhoto class - - - Adds a sepecified category to this collection. - The category to add. - The zero-based index of the added item. - - - A Photo Album category - - - Initialize a new instance of the RssPhotoAlbumItem class - Name of the category. - Description of the category. - From date of the category. - To date of the category. - Photos of the category. - - - Adds a specified category to this collection. - Name of the category. - Description of the category. - From date of the category. - To date of the category. - Photos of the category. - The zero-based index of the added item. - - - Initialize a new instance of the RssPhotoAlbumItem class - Name of the category. - Description of the category. - From date of the category. - To date of the category. - Photos of the category. - - - Adds a specified category to this collection. - Name of the category. - Description of the category. - From date of the category. - To date of the category. - Photos of the category. - The zero-based index of the added item. - - - Initialize a new instance of the RssPhotoAlbumItem class - Name of the category. - Description of the category. - From date of the category. - To date of the category. - Photos of the category. - - - Adds a specified category to this collection. - Name of the category. - Description of the category. - From date of the category. - To date of the category. - Photos of the category. - The zero-based index of the added item. - - - Initialize a new instance of the RssPhotoAlbumItem class - Name of the category. - Description of the category. - From date of the category. - To date of the category. - Photos of the category. - - - Adds a specified category to this collection. - Name of the category. - Description of the category. - From date of the category. - To date of the category. - Photos of the category. - The zero-based index of the added item. - - - RSS syndication for Robert A. Wlodarczyk's Photo Album application (to be sold by Inno Thinx LLC) - - - Base class for all RSS modules - - - Initialize a new instance of the RssModule class - - - Bind a particular channel to this module - Hash code of the channel - - - Check if a particular channel is bound to this module - Hash code of the channel - true if this channel is bound to this module, otherwise false - - - Collection of RSSModuleItem that are to be placed in the channel - - - Collection of RSSModuleItemCollection that are to be placed in the channel item - - - Prefix for the given module namespace - - - URL for the given module namespace - - - Initialize a new instance of the RssPhotoAlbum class - Link to the Photo Album - The category of the Photo Album to add - - - Initialize a new instance of the RssPhotoAlbum class - Link to the Photo Album - A collection of categories in the Photo Album to add - - - Link element for channel - - - Contains default values and methods for maintaining data consistency - - - Default value for a string in all RSS classes - empty string - If an element in the RSS class library has the value of RssDefault.String, consider the element as "not entered", "null", or empty. - - - Default value for an int in all RSS classes - -1 - If an element in the RSS class library has the value of RssDefault.Int, consider the element as "not entered", "null", or empty. - - - Default value for a DateTime in all RSS classes - DateTime.MinValue - If an element in the RSS class library has the value of RssDefault.DateTime, consider the element as "not entered", "null", or empty. - - - Default value for a Uri in all RSS classes - gopher://rss-net.sf.net - If an element in the RSS class library has the value of RssDefault.Uri, consider the element as "not entered", "null", or empty. - - - Verifies the string passed is not null - string to verify - RssDefault.String if input is null, otherwise input - Method is used in properties to prevent a null value - - - Verifies the int passed is greater than or equal to -1 - int to verify - RssDefault.Int if int is less than -1, else input - Method is used in properties to prevent values less than -1 - - - Verifies the Uri passed is not null - Uri to verify - RssDefault.Uri if input is null, otherwise input - Method is used in all properties to prevent a null value - - - Represents Null, False, and True - Source: Microsoft c# example - - - A DBBool containing 'Null'. - One of three possible DBBool values. - - - A DBBool containing 'False'. - One of three possible DBBool values. - - - A DBBool containing 'True'. - One of three possible DBBool values. - - - Private field that stores –1, 0, 1 for False, Null, True. - - - Private instance constructor. The value parameter must be –1, 0, or 1. - - - Implicit conversion from bool to DBBool. Maps true to DBBool.True and false to DBBool.False. - a DBBool - - - Explicit conversion from DBBool to bool. - The given DBBool is Null - a DBBool - true or false - - - Equality operator. - a DBBool - a DBBool - Returns Null if either operand is Null, otherwise returns True or False. - - - Inequality operator. - a DBBool - a DBBool - Returns Null if either operand is Null, otherwise returns True or False. - - - Logical negation operator. - a DBBool - Returns True if the operand is False, Null if the operand is Null, or False if the operand is True. - - - Logical AND operator. - a DBBool - a DBBool - Returns False if either operand is False, otherwise Null if either operand is Null, otherwise True. - - - Logical OR operator. - a DBBool - a DBBool - Returns True if either operand is True, otherwise Null if either operand is Null, otherwise False. - - - Definitely true operator. - a DBBool - Returns true if the operand is True, false otherwise. - - - Definitely false operator. - a DBBool - Returns true if the operand is False, false otherwise. - - - Determines whether two DBBool instances are equal. - The object to check. - True if the two DBBools are equal. - - - Serves as a hash function for a particular type, suitable for use in hashing algorithms and data structures like a hash table. - A hash code for the current DBBool. - - - Returns a string representation of the current Object. - Object has not been initialized. - A string containing DBBool.False, DBBool.Null, or DBBool.True - - - Properties to examine the value of a DBBool. - Return true if this DBBool has the given value, false otherwise. - - - Properties to examine the value of a DBBool. - Return true if this DBBool has the given value, false otherwise. - - - Properties to examine the value of a DBBool. - Return true if this DBBool has the given value, false otherwise. - - - A strongly typed collection of objects - - - Adds a specified item to this collection. - The item to add. - The zero-based index of the added item. - - - Determines whether the RssModuleCollection contains a specific element. - The RssModule to locate in the RssModuleCollection. - true if the RssModuleCollection contains the specified value; otherwise, false. - - - Copies the entire RssModuleCollection to a compatible one-dimensional , starting at the specified index of the target array. - The one-dimensional RssModule Array that is the destination of the elements copied from RssModuleCollection. The Array must have zero-based indexing. - The zero-based index in array at which copying begins. - array is a null reference (Nothing in Visual Basic). - index is less than zero. - array is multidimensional. -or- index is equal to or greater than the length of array.-or-The number of elements in the source RssModuleCollection is greater than the available space from index to the end of the destination array. - - - Searches for the specified RssModule and returns the zero-based index of the first occurrence within the entire RssModuleCollection. - The RssModule to locate in the RssModuleCollection. - The zero-based index of the first occurrence of RssModule within the entire RssModuleCollection, if found; otherwise, -1. - - - Inserts an item into this collection at a specified index. - The zero-based index of the collection at which to insert the item. - The item to insert into this collection. - - - Removes a specified item from this collection. - The item to remove. - - - Gets or sets the item at a specified index.In C#, this property is the indexer for the class. - The index of the collection to access. - An item at each valid index. - This method is an indexer that can be used to access the collection. - index is not a valid index. - - - A strongly typed collection of objects - - - Adds a specified item to this collection. - The item to add. - The zero-based index of the added item. - - - Determines whether the RssItemCollection contains a specific element. - The RssItem to locate in the RssItemCollection. - true if the RssItemCollection contains the specified value; otherwise, false. - - - Copies the entire RssItemCollection to a compatible one-dimensional , starting at the specified index of the target array. - The one-dimensional RssItem Array that is the destination of the elements copied from RssItemCollection. The Array must have zero-based indexing. - The zero-based index in array at which copying begins. - array is a null reference (Nothing in Visual Basic). - index is less than zero. - array is multidimensional. -or- index is equal to or greater than the length of array.-or-The number of elements in the source RssItemCollection is greater than the available space from index to the end of the destination array. - - - Searches for the specified RssItem and returns the zero-based index of the first occurrence within the entire RssItemCollection. - The RssItem to locate in the RssItemCollection. - The zero-based index of the first occurrence of RssItem within the entire RssItemCollection, if found; otherwise, -1. - - - Inserts an item into this collection at a specified index. - The zero-based index of the collection at which to insert the item. - The item to insert into this collection. - - - Removes a specified item from this collection. - The item to remove. - - - The latest pubDate in the items collection - The latest pubDate -or- RssDefault.DateTime if all item pubDates are not defined - - - The oldest pubDate in the items collection - The oldest pubDate -or- RssDefault.DateTime if all item pubDates are not defined - - - Calculates the oldest and latest pubdates - - - Gets or sets the item at a specified index.In C#, this property is the indexer for the class. - The index of the collection to access. - An item at each valid index. - This method is an indexer that can be used to access the collection. - index is not a valid index. - - - Allow processes to register with a cloud to be notified of updates to the channel. - - - Initialize a new instance of the RssCloud class. - - - Domain name or IP address of the cloud - - - TCP port that the cloud is running on - - - Location of its responder - - - Name of the procedure to call to request notification - - - Protocol used - - - A strongly typed collection of objects - - - Adds a specified feed to this collection. - The feed to add. - The zero-based index of the added feed. - - - Determines whether the RssFeedCollection contains a specific element. - The RssFeed to locate in the RssFeedCollection. - true if the RssFeedCollection contains the specified value; otherwise, false. - - - Copies the entire RssFeedCollection to a compatible one-dimensional , starting at the specified index of the target array. - The one-dimensional RssFeed Array that is the destination of the elements copied from RssFeedCollection. The Array must have zero-based indexing. - The zero-based index in array at which copying begins. - array is a null reference (Nothing in Visual Basic). - index is less than zero. - array is multidimensional. -or- index is equal to or greater than the length of array.-or-The number of elements in the source RssFeedCollection is greater than the available space from index to the end of the destination array. - - - Searches for the specified RssFeed and returns the zero-based index of the first occurrence within the entire RssFeedCollection. - The RssFeed to locate in the RssFeedCollection. - The zero-based index of the first occurrence of RssFeed within the entire RssFeedCollection, if found; otherwise, -1. - - - Inserts a feed into this collection at a specified index. - The zero-based index of the collection at which to insert the feed. - The feed to insert into this collection. - - - Removes a specified category from this collection. - The category to remove. - - - Gets or sets the feed at a specified index.In C#, this property is the indexer for the class. - The index of the collection to access. - A feed at each valid index. - This method is an indexer that can be used to access the collection. - index is not a valid index. - - - Gets or sets the feed with the given name.In C#, this property is the indexer for the class. - The url of the feed to access. - A feed at each valid url. If the feed does not exist, null. - This method is an indexer that can be used to access the collection. - - - A RSS module that adds elements at the channel level that are common to weblogs. - - - Initialize a new instance of the - The URL of an OPML file containing the blogroll for the site. - The URL of an OPML file containing the author's RSS subscriptions. - - The URL of a weblog that the author of the weblog is promoting per Mark Pilgrim's description. - "http://diveintomark.org/archives/2002/09/17.html#blink_and_youll_miss_it" - - - The URL of a changes.xml file. When the feed that contains this element updates, it pings a server that updates this file. The presence of this element says to aggregators that they only have to read the changes file to see if this feed has updated. If several feeds point to the same changes file, the aggregator has to do less polling, resulting in better use of server bandwidth, and the Internet as a whole; and resulting in faster scans. Everyone wins. For more technical information, see the howto on the XML-RPC site. - "http://www.xmlrpc.com/weblogsComForRss" - - - - All valid Rss Cloud protocols, including Null - - - Not defined - - - Protocol is not supported - - - xml-rpc - - - soap - - - http-post - - - All RSS versions - - - Not defined - - - Version is not directly supported - - - RDF Site Summary (RSS) 0.9 - - - Rich Site Summary (RSS) 0.91 - - - Rich Site Summary (RSS) 0.92 - - - RDF Site Summary (RSS) 1.0 - - - Really Simple Syndication (RSS) 2.0 - - - Writes an RSS XML file. - Represents a writer that provides a fast, non-cached, forward-only way of generating streams or files containing RSS XML data that conforms to the W3C Extensible Markup Language (XML) 1.0 and the Namespaces in XML recommendations. - - - Creates an instance of the RssWriter class using the specified TextWriter. - specified TextWriter - - - Creates an instance of the RssWriter class using the specified Stream and Encoding. - The encoding is not supported or the stream cannot be written to. - Stream to output to - The encoding to use. If encoding is (null c#, Nothing vb) it writes out the stream as UTF-8. - - - Creates an instance of the RssWriter class using the specified Stream. - The encoding is ISO-8859-1. - The Stream cannot be written to. - specified Stream - - - Creates an instance of the RssWriter class using the specified file and Encoding. - The encoding is not supported; the filename is empty, contains only white space, or contains one or more invalid characters. - Access is denied. - The filename is a (null c#, Nothing vb) reference. - The directory to write to is not found. - The filename includes an incorrect or invalid syntax for file name, directory name, or volume label syntax. - The caller does not have the required permission. - specified file (including path) If the file exists, it will be truncated with the new content. - specified Encoding - - - Creates an instance of the RssWriter class using the specified file. - The encoding is ISO-8859-1. - The filename is empty, contains only white space, or contains one or more invalid characters. - Access is denied. - The filename is a (null c#, Nothing vb) reference. - The directory to write to is not found. - The filename includes an incorrect or invalid syntax for file name, directory name, or volume label syntax. - The caller does not have the required permission. - specified file (including path) If the file exists, it will be truncated with the new content. - - - Writes the begining data to the RSS file - This routine is called from the WriteChannel and WriteItem subs - RDF Site Summary (RSS) 1.0 is not currently supported. - - - Closes instance of RssWriter. - Writes end elements, and releases connections - Occurs if the RssWriter is already closed or the caller is attempting to close before writing a channel. - - - Writes an RSS channel - RssWriter has been closed, and can not be written to. - Channel must be instanciated with data, before calling Write. - RSS channel to write - - - Writes an RSS item - Either the RssWriter has already been closed, or the caller is attempting to write an RSS item before an RSS channel. - Item must be instanciated with data, before calling Write. - RSS item to write - - - Writes an element with the specified local name and value - the localname of the element - the value of the element - boolean that determines if input cannot be null - - - Writes an element with the specified local name and value - the localname of the element - the value of the element - boolean that determines if input cannot be null - - - Writes an element with the specified local name and value - the localname of the element - the value of the element - boolean that determines if input cannot be null - - - Writes an element with the specified local name and value - the localname of the element - the value of the element - boolean that determines if input cannot be null - - - Writes an element with the specified local name and value - the localname of the element - the value of the element - boolean that determines if input cannot be null - - - Writes an attribute with the specified local name and value - the localname of the element - the value of the element - boolean that determines if input cannot be null - - - Writes an attribute with the specified local name and value - the localname of the element - the value of the element - boolean that determines if input cannot be null - - - Writes an attribute with the specified local name and value - the localname of the element - the value of the element - boolean that determines if input cannot be null - - - Writes an attribute with the specified local name and value - the localname of the element - the value of the element - boolean that determines if input cannot be null - - - Writes an attribute with the specified local name and value - the localname of the element - the value of the element - boolean that determines if input cannot be null - - - Gets or sets the RSS version to write. - Can't change version number after data has been written. - - - Gets or sets the of the XML output. - Can't change XML formatting after data has been written. - - - Gets or sets how indentation to write for each level in the hierarchy when XmlFormat is set to - Can't change XML formatting after data has been written. - Setting this property to a negative value. - - - RSS modules - - - Reads an RSS file. - Provides fast, non-cached, forward-only access to RSS data. - - - Initializes a new instance of the RssReader class with the specified URL or filename. - The URL or filename for the file containing the RSS data. - Occures when unable to retrieve file containing the RSS data. - - - Creates an instance of the RssReader class using the specified TextReader. - specified TextReader - Occures when unable to retrieve file containing the RSS data. - - - Creates an instance of the RssReader class using the specified Stream. - Occures when unable to retrieve file containing the RSS data. - Stream to read from - - - Reads the next RssElement from the stream. - An RSS Element - RssReader has been closed, and can not be read. - RSS file not found. - Invalid XML syntax in RSS file. - Unable to read an RssElement. Reached the end of the stream. - - - Closes connection to file. - This method also releases any resources held while reading. - - - A collection of all exceptions the RssReader class has encountered. - - - Gets the RSS version of the stream. - One of the values. - - - Globally unique identifier - - - Initialize a new instance of the RssGuid class. - - - If true, a url that can be opened in a web browser that points to the item - - - Globally unique identifier value - - - A link and description for a graphic that represent a channel - - - Initialize a new instance of the RssImage class. - - - The URL of a GIF, JPEG or PNG image that represents the channel. - Maximum length is 500 (For RSS 0.91). - - - Describes the image, it's used in the ALT attribute of the HTML img tag when the channel is rendered in HTML. - Maximum length is 100 (For RSS 0.91). - - - The URL of the site, when the channel is rendered, the image is a link to the site. - Maximum length is 500 (For RSS 0.91). - - - Contains text that is included in the TITLE attribute of the link formed around the image in the HTML rendering. - - - Width of image in pixels - Maximum value for height is 400 (For RSS 0.91) - - - Height of image in pixels - Maximum value for width is 144 (For RSS 0.91) - - - A module may contain any number of items (either channel-based or item-based). - - - Initialize a new instance of the RssModuleItem class - - - Initialize a new instance of the RssModuleItem class - The name of this RssModuleItem. - - - Initialize a new instance of the RssModuleItem class - The name of this RssModuleItem. - Is text required for this RssModuleItem? - - - Initialize a new instance of the RssModuleItem class - The name of this RssModuleItem. - The text contained within this RssModuleItem. - - - Initialize a new instance of the RssModuleItem class - The name of this RssModuleItem. - Is text required for this RssModuleItem? - The text contained within this RssModuleItem. - - - Initialize a new instance of the RssModuleItem class - The name of this RssModuleItem. - The text contained within this RssModuleItem. - The sub-elements of this RssModuleItem (if any exist). - - - Initialize a new instance of the RssModuleItem class - The name of this RssModuleItem. - Is text required for this RssModuleItem? - The text contained within this RssModuleItem. - The sub-elements of this RssModuleItem (if any exist). - - - Returns a string representation of the current Object. - The item's title, description, or "RssModuleItem" if the title and description are blank. - - - - The name of this RssModuleItem. - - - - - The text contained within this RssModuleItem. - - - - - The sub-elements of this RssModuleItem (if any exist). - - - - - Is text for this element required? - - - - Describes an items source - - - Initialize a new instance of the RssSource class - - - Name of the RSS channel that the item came from - - - URL of the original RSS feed from which the item was republished - - - A strongly typed collection of objects - - - Adds a specified exception to this collection. - The exception to add. - The zero-based index of the added exception -or- -1 if the exception already exists. - - - Determines whether the ExceptionCollection contains a specific element. - The Exception to locate in the ExceptionCollection. - true if the ExceptionCollection contains the specified value; otherwise, false. - - - Copies the entire ExceptionCollection to a compatible one-dimensional , starting at the specified index of the target array. - The one-dimensional Exception Array that is the destination of the elements copied from ExceptionCollection. The Array must have zero-based indexing. - The zero-based index in array at which copying begins. - array is a null reference (Nothing in Visual Basic). - index is less than zero. - array is multidimensional. -or- index is equal to or greater than the length of array.-or-The number of elements in the source ExceptionCollection is greater than the available space from index to the end of the destination array. - - - Searches for the specified Exception and returns the zero-based index of the first occurrence within the entire ExceptionCollection. - The Exception to locate in the ExceptionCollection. - The zero-based index of the first occurrence of RssChannel within the entire ExceptionCollection, if found; otherwise, -1. - - - Inserts an Exception into this collection at a specified index. - The zero-based index of the collection at which to insert the Exception. - The Exception to insert into this collection. - - - Removes a specified Exception from this collection. - The Exception to remove. - - - Gets or sets the exception at a specified index.In C#, this property is the indexer for the class. - The index of the collection to access. - A exception at each valid index. - This method is an indexer that can be used to access the collection. - - - Returns the last exception added through the Add method. - The last exception -or- null if no exceptions exist - - - A strongly typed collection of objects - - - Adds a specified category to this collection. - The category to add. - The zero-based index of the added category. - - - Determines whether the RssCategoryCollection contains a specific element. - The RssCategory to locate in the RssCategoryCollection. - true if the RssCategoryCollection contains the specified value; otherwise, false. - - - Copies the entire RssCategoryCollection to a compatible one-dimensional , starting at the specified index of the target array. - The one-dimensional RssCategory Array that is the destination of the elements copied from RssCategoryCollection. The Array must have zero-based indexing. - The zero-based index in array at which copying begins. - array is a null reference (Nothing in Visual Basic). - index is less than zero. - array is multidimensional. -or- index is equal to or greater than the length of array.-or-The number of elements in the source RssCategoryCollection is greater than the available space from index to the end of the destination array. - - - Searches for the specified RssCategory and returns the zero-based index of the first occurrence within the entire RssCategoryCollection. - The RssCategory to locate in the RssCategoryCollection. - The zero-based index of the first occurrence of RssCategory within the entire RssCategoryCollection, if found; otherwise, -1. - - - Inserts an category into this collection at a specified index. - The zero-based index of the collection at which to insert the category. - The category to insert into this collection. - - - Removes a specified category from this collection. - The category to remove. - - - Gets or sets the category at a specified index.In C#, this property is the indexer for the class. - The index of the collection to access. - A category at each valid index. - This method is an indexer that can be used to access the collection. - index is not a valid index. - - - A RSS module that adds elements at the channel or item level that specifies which Creative Commons license applies. - - - Initialize a new instance of the - - If present as a sub-element of channel, indicates that the content of the RSS file is available under a license, indicated by a URL, which is the value of the license element. A list of some licenses that may be used in this context is on the Creative Commons website on this page, however the license element may point to licenses not authored by Creative Commons. - You may also use the license element as a sub-element of item. When used this way it applies only to the content of that item. If an item has a license, and the channel does too, the license on the item applies, i.e. the inner license overrides the outer one. - Multiple license elements are allowed, in either context, indicating that the content is available under multiple licenses. - "http://www.creativecommons.org/licenses/" - - If present as a sub-element of channel then true, otherwise false - - - A channel may contain any number of items, each of which links to more information about the item, with an optional description - - - Initialize a new instance of the RssItem class - - - Returns a string representation of the current Object. - The item's title, description, or "RssItem" if the title and description are blank. - - - Title of the item - Maximum length is 100 (For RSS 0.91) - - - URL of the item - Maximum length is 500 (For RSS 0.91) - - - Item synopsis - Maximum length is 500 (For RSS 0.91) - - - Email address of the author of the item - - - Provide information regarding the location of the subject matter of the channel in a taxonomy - - - URL of a page for comments relating to the item - - - Describes an items source - - - A reference to an attachment to the item - - - A string that uniquely identifies the item - - - Indicates when the item was published - - - Multi-purpose channel element for the purpose of allowing users to submit queries back to the publisher's site - Typically for a search or subscription - - - Initialize a new instance of the RssTextInput class - - - The label of the submit button in the text input area - Maximum length is 100 (For RSS 0.91) - - - Explains the text input area - Maximum length is 500 (For RSS 0.91) - - - The name of the text object in the text input area - Maximum length is 20 (For RSS 0.91). - - - The URL of the script that processes text input requests - Maximum length is 500 (For RSS 0.91) - - - diff --git a/NzbDrone.Core/Libraries/RSS.NET.dll b/NzbDrone.Core/Libraries/RSS.NET.dll deleted file mode 100644 index 10dd1f774..000000000 Binary files a/NzbDrone.Core/Libraries/RSS.NET.dll and /dev/null differ diff --git a/NzbDrone.Core/Libraries/SubSonic.Core.XML b/NzbDrone.Core/Libraries/SubSonic.Core.XML index ece982406..19f287fbb 100644 --- a/NzbDrone.Core/Libraries/SubSonic.Core.XML +++ b/NzbDrone.Core/Libraries/SubSonic.Core.XML @@ -4,2580 +4,2747 @@ SubSonic.Core - + - Removes column declarations in SelectExpression's that are not referenced + - + - An extended expression visitor including custom DbExpression nodes + - + - returns the list of SelectExpressions accessible from the source expression + - + - Determines if a SelectExpression contains any aggregate expressions + Type related helper methods - + - A simple query mapping that attempts to infer mapping from naming conventionss + - + - Defines mapping information and rules for the query provider + Initializes a new instance of the class. + From. + To. + Type of the join. - + - Determines if a give CLR type is mapped as a database entity + Gets the join type value. - + The j. + - + - Deterimines is a property is mapped onto a column or relationship + Gets or sets the type. - - + The type. - + - Determines if a property is mapped onto a column + Gets or sets from column. - - + From column. - + - Determines if a property represents or is part of the entities unique identity (often primary key) + Gets or sets to column. - - + To column. - + - Determines if a property is mapped as a relationship + - - - + - The type of the entity on the other side of the relationship + - - - + - The name of the corresponding database table + - - - + - The name of the corresponding table column + - - - + - A sequence of all the mapped members + - - - + - Determines if a relationship property refers to a single optional entity (as opposed to a collection.) + - - - + - Get a query expression that selects all entities from a table + - - - + - Gets an expression that constructs an entity instance relative to a root. - The root is most often a TableExpression, but may be any other experssion such as - a ConstantExpression. + - - - - + - Get the members for the key properities to be joined in an association relationship + - - - - + - Get an expression for a mapped property relative to a root expression. - The root is either a TableExpression or an expression defining an entity instance. + Returns Schema instance with empty lists. - - - - + - Get a function that coerces an a sequence of one type into another type. - This is primarily used for aggregators stored in ProjectionExpression's, which are used to represent the - final transformation of the entire result set of a query. + Defines the language rules for the query provider - The expected type. - The actual type. + + + + Defines the language rules for the query provider + + + + + Determines whether the CLR type corresponds to a scalar data type in the query language + + - + - Apply mapping translations to this expression + Determines whether the given expression can be represented as a column in a select expressionss - + - The language related to the mapping + Provides language specific query translation. Use this to apply language specific rewrites or + to make assertions/validations about the query. + + - + - Builds an execution plan for a query expression + Converts the query expression into text of this query language + + - + - columns referencing the outer alias are turned into special named-value parameters + Determine which sub-expressions must be parameters + + - - + - Returns an Object with the specified Type and whose value is equivalent to the specified object. + An enumeration value for no options configured. - An Object that implements the IConvertible interface. - - An object whose Type is conversionType (or conversionType's underlying type if conversionType - is Nullable<>) and whose value is equivalent to value. -or- a null reference, if value is a null - reference and conversionType is not a value type. - - - This method exists as a workaround to System.Convert.ChangeType(Object, Type) which does not handle - nullables as of version 2.0 (2.0.50727.42) of the .NET Framework. The idea is that this method will - be deleted once Convert.ChangeType is updated in a future version of the .NET Framework to handle - nullable types, so we want this to behave as closely to Convert.ChangeType as possible. - This method was written by Peter Johnson at: - http://aspalliance.com/author.aspx?uId=1026. - - - + - + The default set of options (right now the same as none). - + - Equals to. + Use this flag to let the repository run migrations. - The value. - - + - Determines whether the specified is equal to the current . + - The to compare with the current . - - true if the specified is equal to the current ; otherwise, false. - - The parameter is null. - + - Serves as a hash function for a particular type. + - - A hash code for the current . - - + - Returns a that represents the current . + Initializes a new instance of the class. - - A that represents the current . - + The provider. - + - Initializes a new instance of the class. + Validates the query. - + - Initializes a new instance of the class. + Finds the column. - The table. + Name of the column. + - + - Sets the specified column name. + Wheres the specified column name. - Name of the column. + Name of the column. - + - Sets the expression. + Wheres the specified column. The column. - + - Executes this instance. + Wheres the specified agg. + The agg. - + - + Ors the specified column name. + Name of the column. + - + - Initializes a new instance of the class. + Ors the specified column. - The provider. + The column. + - + - Sets the specified columns. + Ors the specified agg. - The columns. + The agg. - + - Summary for the RegexPattern class + Ors the expression. + Name of the column. + - + - + Opens the expression. + - + - Initializes a new instance of the class. + Closes the expression. - From. - To. - Type of the join. + - + - Gets the join type value. + Ands the specified column name. - The j. + Name of the column. - + - Gets or sets the type. + Ands the specified column. - The type. + The column. + - + - Gets or sets from column. + Ands the specified agg. - From column. + The agg. + - + - Gets or sets to column. + Ands the expression. - To column. + Name of the column. + - + - + Returns the currently set SQL statement for this query object + - + - + Builds the SQL statement. + - + - + Froms the specified TBL. + The TBL. + - + - + Froms the specified TBL. + Name of the table. + - + - + Froms the specified TBL. + + - + - + Creates an inner join based on the passed-in column names + + + + - + - + Creates an Inner Join, guessing based on Primary Key matching + + - + - + Inners the join. + From column. + To column. + - + - + Outers the join. + From column. + To column. + - + - + Crosses the join. + From column. + To column. + - + - Initializes a new instance of the class. + Lefts the inner join. + From column. + To column. + - + - Initializes a new instance of the class. + Rights the inner join. - The provider. + From column. + To column. + - + - Builds the SQL statement. + Lefts the outer join. + From column. + To column. - + - Adds the specified columns into a new Insert object. + Rights the outer join. - - The columns. + From column. + To column. - + - Adds the specified columns into a new Insert object. + Nots the equal join. - - The TBL. + From column. + To column. - + - Inits this instance. + Orders the asc. + The columns. - + - Values the specified column. + Orders the desc. - The column. - The column value. + The columns. - + - Values the specified column. + Pageds the specified current page. - The column. - The column value. - Type of the db. + The current page. + Size of the page. - + - Valueses the specified values. + Pageds the specified current page. - The values. + The current page. + Size of the page. + The id column. - + - Values the expression. + Executes this instance. - The values. - + - Returns a that represents the current . + Executes the reader. - - A that represents the current . - + - + - Executes this instance. + Executes the scalar. - + - Removes duplicate column declarations that refer to the same underlying column + Executes the scalar. + The type of the result. + - + - Converts LINQ query operators to into custom DbExpression's + Gets the record count. + - + - Initializes the class. + Executes the typed list. + + - + - Strips the last specified chars from a string. + Executes the typed list. - The source string. - The remove from end. + - + - Strips the last specified chars from a string. + Executes the query and returns the result as a single item of T - The source string. - The back down to. - + The type of item to return - + - Plurals to singular. + Executes the transaction. - The source string. - + The queries. - + - Singulars to plural. + Executes the transaction. - The source string. - + The queries. + Name of the connection string. - + - Make plural when count is not one + Gets or sets the open paren count. - The number of things - The source string. - + The open paren count. - + - Removes the specified chars from the beginning of a string. + Gets or sets the closed paren count. - The source string. - The remove from beginning. - + The closed paren count. - + - Removes chars from the beginning of a string, up to the specified string + Initializes a new instance of the class. - The source string. - The remove up to. - - + - Strips the last char from a a string. + Initializes a new instance of the class. - The source string. - + The table. + The provider. - + - Strips the last char from a a string. + - The source string. - - + - Fasts the replace. + - The original. - The pattern. - The replacement. - - + - Fasts the replace. + - The original. - The pattern. - The replacement. - Type of the comparison. - - + - Returns text that is located between the startText and endText tags. + - The source string. - The text from which to start the crop - The endpoint of the crop - - + - Removes excess white space in a string. + - The source string. - - + - Removes all non-alpha numeric characters in a string + Enum for General SQL Functions - The source string. - - + - Creates a string array based on the words in a sentence + - The source string. + + + + Counts the specified col. + + The col. - + - Strips all HTML tags from a string + Counts the specified col. - The HTML string. + The col. + The alias. - + - Strips all HTML tags from a string and replaces the tags with the specified replacement + Counts the specified column name. - The HTML string. - The HTML place holder. + Name of the column. - + - Converts a generic List collection to a single comma-delimitted string. + Counts the specified column name. - The list. + Name of the column. + The alias. - + - Converts a generic List collection to a single string using the specified delimitter. + Sums the specified col. - The list. - The delimiter. + The col. - + - Strips the specified input. + Sums the specified column name. - The source string. - The strip value. + Name of the column. - + - Converts ASCII encoding to Unicode + Sums the specified col. - The ASCII code. + The col. + The alias. - + - Converts Text to HTML-encoded string + Sums the specified column name. - The text string. + Name of the column. + The alias. - + - Converts HTML-encoded bits to Text + Groups the by. - The entity text. + The col. - + - Formats the args using String.Format with the target string as a format string. + Groups the by. - The format string passed to String.Format - The args passed to String.Format + Name of the column. - + - Strings to enum. + Groups the by. - - The value. + The col. + The alias. - + - Fills the entities. + Groups the by. + Name of the column. + The alias. + - + - Converts US State Name to it's two-character abbreviation. Returns null if the state name was not found. + Avgs the specified col. - US State Name (ie Texas) + The col. - + - Converts a two-character US State Abbreviation to it's official Name Returns null if the abbreviation was not found. + Avgs the specified column name. - US State Name (ie Texas) + Name of the column. - + - Fills the US States. + Avgs the specified col. + The col. + The alias. + - + - + Avgs the specified column name. + Name of the column. + The alias. + - + - + Maxes the specified col. + The col. + - + - Generates the command line. + Maxes the specified column name. + Name of the column. - + - Generates the constraints. + Maxes the specified col. + The col. + The alias. - + - Generates from list. + Maxes the specified column name. + Name of the column. + The alias. - + - Generates the order by. + Mins the specified col. + The col. - + - Generates the group by. + Mins the specified column name. + Name of the column. - + - Generates the joins. + Mins the specified col. + The col. + The alias. - + - Gets the paging SQL wrapper. + Mins the specified column name. + Name of the column. + The alias. - + - Gets the select columns. + Variances the specified col. + The col. - + - Finds the column. + Variances the specified column name. Name of the column. - + - Builds the select statement. + Variances the specified col. + The col. + The alias. - + - Builds the paged select statement. + Variances the specified column name. + Name of the column. + The alias. - + - Builds the update statement. + Standards the deviation. + The col. - + - Builds the insert statement. + Standards the deviation. + Name of the column. - + - Builds the delete statement. + Standards the deviation. + The col. + The alias. - + - Sets the insert query. + Standards the deviation. - The q. + Name of the column. + The alias. + - + - SqlFragment. Field values may change depending on the inheriting Generator. + Initializes a new instance of the class. + Name of the column. + Type of the aggregate. - + - Initializes a new instance of the class. + Initializes a new instance of the class. - The q. + Name of the column. + The alias. + Type of the aggregate. - + - Sets the insert query. + Initializes a new instance of the class. - The q. + The column. + Type of the aggregate. - + - Finds the column. + Initializes a new instance of the class. - Name of the column. - + The column. + The alias. + Type of the aggregate. - + - Generates the group by. + Gets the type of the function. + The agg. - + - Generates the command line. + Gets the SQL function call without an alias. Example: AVG(UnitPrice). - + - Generates the joins. + Overrides ToString() to return the SQL Function call - + - Generates from list. + Gets or sets the type of the aggregate. - + The type of the aggregate. - + - Generates the constraints. + Gets or sets the name of the column. - + The name of the column. - + - Generates the order by. + Gets or sets the alias. - + The alias. - + - Gets the select columns. + returns the set of all aliases produced by a query source - - + - Gets the paging SQL wrapper. + An extended expression visitor including custom DbExpression nodes - - + - Builds the paged select statement. + Moves order-bys to the outermost select if possible - - + - Builds the select statement. + Add a sequence of order expressions to an accumulated list, prepending so as + to give precedence to the new expressions over any previous expressions - + - + - Builds the update statement. + Rebind order expressions to reference a new alias and add to column declarations if necessary - - + - Builds the insert statement. + returns the set of all aliases produced by a query source - - + - Builds the delete statement. + Determines if a SelectExpression contains any aggregate expressions - - + - Qualifies the name of the table. + Summary for the Dates class - The TBL. - - + - Gets the qualified select. + Returns a date in the past by days. - The table. + The days. - + - Generates the select column list. + Returns a date in the future by days. + The days. - + - Builds the aggregate commands. + Returns a date in the past by hours. + The hours. - + - Generates the 'SELECT' part of an + Returns a date in the future by hours. - The aggregate to include in the SELECT clause - The portion of the SELECT clause represented by this - - The ToString() logic moved from , rather than - including it in the Aggregate class itself... - + The hours. + - + - Initializes a new instance of the class. + Returns a date in the past by minutes - The query. + The minutes. + - + - Builds the paged select statement. + Returns a date in the future by minutes. + The minutes. - + - Builds the insert statement. + Gets a date in the past according to seconds + The seconds. - + - A schema generator for your DB + Gets a date in the future by seconds. + The seconds. + - + - Builds a CREATE TABLE statement. + Diffs the specified date. - + The date one. + The date two. - + - Builds a DROP TABLE statement. + Returns a double indicating the number of days between two dates (past is negative) - Name of the table. + The date one. + The date two. - + - Adds the column. + Returns a double indicating the number of days between two dates (past is negative) - Name of the table. - The column. + The date one. + The date two. + - + - Alters the column. + Returns a double indicating the number of days between two dates (past is negative) - The column. + The date one. + The date two. + - + - Removes the column. + Returns a double indicating the number of days between two dates (past is negative) - Name of the table. - Name of the column. + The date one. + The date two. - + - Gets the type of the native. + Returns a double indicating the number of days between two dates (past is negative) - Type of the db. + The date one. + The date two. - + - Generates the columns. + Returns a double indicating the number of days between two dates (past is negative) - Table containing the columns. - - SQL fragment representing the supplied columns. - + The date one. + The date two. + - + - Sets the column attributes. + Displays the difference in time between the two dates. Return example is "12 years 4 months 24 days 8 hours 33 minutes 5 seconds" - The column. + The start time. + The end time. - + - Builds a CREATE TABLE statement. + Counts the number of weekdays between two dates. - + The start time. + The end time. - + - Builds a DROP TABLE statement. + Counts the number of weekends between two dates. - Name of the table. + The start time. + The end time. - + - Adds the column. + Verifies if the object is a date - Name of the table. - The column. - + The dt. + + true if the specified dt is date; otherwise, false. + - + - Alters the column. + Checks to see if the date is a week day (Mon - Fri) - The column. + The dt. + + true if [is week day] [the specified dt]; otherwise, false. + - + - Removes the column. + Checks to see if the date is Saturday or Sunday - Name of the table. - Name of the column. - + The dt. + + true if [is week end] [the specified dt]; otherwise, false. + - + - Gets the type of the native. + Displays the difference in time between the two dates. Return example is "12 years 4 months 24 days 8 hours 33 minutes 5 seconds" - Type of the db. + The start time. + The end time. - + - Generates the columns. + Given a datetime object, returns the formatted month and day, i.e. "April 15th" - Table containing the columns. - - SQL fragment representing the supplied columns. - + The date to extract the string from + - + - Sets the column attributes. + Given a datetime object, returns the formatted day, "15th" - The column. + The date to extract the string from - + - Gets an ITable from the DB based on name + Remove leading strings with zeros and adjust for singular/plural + The STR. + The previous STR. + The t. + - + - Creates a list of table names + - + + + - + - Removes one or more SelectExpression's by rewriting the expression tree to not include them, promoting - their from clause expressions and rewriting any column expressions that may have referenced them to now - reference the underlying data directly. + Generates the command line. + - + - Attempts to rewrite cross-apply and outer-apply joins as inner and left-outer joins + Generates the constraints. + - + - rewrites nested projections into client-side joins + Generates from list. + - + - Formats a query expression into TSQL language syntax + Generates the order by. + - + - Formats a query expression into TSQL language syntax + Generates the group by. + - + - Extended node types for custom expressions + Generates the joins. + - + - A custom expression node that represents a table reference in a SQL query + Gets the paging SQL wrapper. + - + - A custom expression node that represents a reference to a column in a SQL query + Gets the select columns. + - + - A declaration of a column in a SQL SELECT expression + Finds the column. + Name of the column. + - + - An SQL OrderBy order type + Builds the select statement. + - + - A pairing of an expression and an order type for use in a SQL Order By clause + Builds the paged select statement. + - + - A custom expression node used to represent a SQL SELECT expression + Builds the update statement. + - + - A kind of SQL join + Builds the insert statement. + - + - A custom expression node representing a SQL join clause + Builds the delete statement. + - + - Allows is-null tests against value-types like int and float + Sets the insert query. + The q. - + - A custom expression representing the construction of one or more result objects from a - SQL select expression + SqlFragment. Field values may change depending on the inheriting Generator. - + - Holds list of tables, views, stored procedures, etc. + Initializes a new instance of the class. - + - Initializes the shared connection. + Sets the insert query. - + The q. - + - Initializes the shared connection. + Finds the column. - The shared connection string. + Name of the column. - + - Resets the shared connection. + Generates the group by. + - + - Adds the params. + Generates the command line. - The CMD. - The qry. + - + - Gets a value indicating whether [current connection string is default]. + Generates the joins. - - true if [current connection string is default]; otherwise, false. - + - + - Gets or sets the current shared connection. + Generates from list. - The current shared connection. + - + - For Jeff Atwood - http://www.codinghorror.com/blog/archives/000989.html + Generates the constraints. + + + - A class which wraps an inline SQL call + Generates the order by. + - + - Initializes a new instance of the class. - Warning: This method assumes the default provider is intended. - Call InlineQuery(string providerName) if this is not the case. + Gets the select columns. - The SQL. + - + - Initializes a new instance of the class. + Gets the paging SQL wrapper. - The SQL. - The values. + - + - Initializes a new instance of the class. + Builds the paged select statement. - The provider. + - + - Gets the command. + Builds the select statement. - + - Executes the specified SQL. + Builds the update statement. + - + - Executes the scalar. + Builds the insert statement. - The type of the result. - + - Executes the typed list. + Builds the delete statement. - - + - Executes the reader. + Qualifies the name of the table. + The TBL. - + - TSQL specific QueryLanguage + Gets the qualified select. + The table. + - + - Defines the language rules for the query provider + Generates the select column list. + - + - Determines whether the CLR type corresponds to a scalar data type in the query language + Builds the aggregate commands. - - + - Determines whether the given expression can be represented as a column in a select expressionss + Generates the 'SELECT' part of an - - + The aggregate to include in the SELECT clause + The portion of the SELECT clause represented by this + + The ToString() logic moved from , rather than + including it in the Aggregate class itself... + - + - Provides language specific query translation. Use this to apply language specific rewrites or - to make assertions/validations about the query. + Initializes a new instance of the class. - - + The query. - + - Converts the query expression into text of this query language + Builds the paged select statement. - - + - Determine which sub-expressions must be parameters + Builds the insert statement. - - + - Rewrites nested singleton projection into server-side joins + Summary for the SqlFragment class - + - Gets a value indicating whether this instance is numeric. + - - true if this instance is numeric; otherwise, false. - - + - Gets a value indicating whether this instance is date time. + Initializes a new instance of the class. - - true if this instance is date time; otherwise, false. - + The provider. + The columns. - + - Gets a value indicating whether this instance is string. + Initializes a new instance of the class. - true if this instance is string; otherwise, false. - + - Gets a value indicating whether this instance is numeric. - - - true if this instance is numeric; otherwise, false. - - - - - Gets a value indicating whether this instance is date time. + Initializes a new instance of the class. - - true if this instance is date time; otherwise, false. - + The aggregates. - + - Gets a value indicating whether this instance is string. + Initializes a new instance of the class. - true if this instance is string; otherwise, false. + The provider. + The aggregates. - + - Summary for the ReservedColumnName class + Initializes a new instance of the class. + The columns. - + - Returns Schema instance with empty lists. + Initializes a new instance of the class. + WARNING: This overload should only be used with applications that use a single provider! + The columns. - + - Where, And, Or + Alls the columns from. + + - + - WHERE operator + Expressions the specified SQL expression. + The SQL expression. + - + - AND operator + Tops the specified top. + The top. + - + - OR Operator + Result from calling ColumnProjector.ProjectColumns - + - SQL Comparison Operators + Splits an expression into two parts + 1) a list of column declarations for sub-expressions that must be evaluated on the server + 2) a expression that describes how to combine/project the columns back together into the correct result - + - Summary for the SqlComparison class + Nominator is a class that walks an expression tree bottom up, determining the set of + candidate expressions that are possible columns of a select expression - + - A Class for handling SQL Constraint generation + A LINQ IQueryable query provider that executes database queries over a DbConnection - + - The query that this constraint is operating on + A basic abstract LINQ query provider - + - Initializes a new instance of the class. + Optional interface for IQueryProvider to implement Query<T>'s QueryText property. - The condition. - Name of the constraint column. - + - Initializes a new instance of the class. + DbQueryProvider constrcutor that allows for external control of policy + to allow for new types of databases. - The condition. - Name of the constraint column. - Name of the constraint qualified column. - + - Initializes a new instance of the class. + Converts the query expression into text that corresponds to the command that would be executed. + Useful for debugging. - The condition. - Name of the constraint column. - Name of the constraint qualified column. - The constraint construction fragment. + + - + - Initializes a new instance of the class. + Execute the query expression (does translation, etc.) - The condition. - Name of the constraint column. - The SQL query. + + - + - Initializes a new instance of the class. + Convert the query expression into an execution plan - The condition. - Name of the constraint column. - Name of the constraint qualified column. - The constraint construction fragment. - The SQL query. + + - + - Wheres the specified column name. + Do all query translations execpt building the execution plan - Name of the column. + - + - Ands the specified column name. + Determines whether a given expression can be executed locally. + (It contains no parts that should be translated to the target environment.) - Name of the column. + - + - Ors the specified column name. + Execute an actual query specified in the target language using the sADO connection - Name of the column. + + + - + - Gets or sets the name of the table. + Get an IEnumerable that will execute the specified query when enumerated - The name of the table. + + + + - + - Gets the comparison operator. + Get an ADO command object initialized with the command-text and parameters - The comp. + + + - + - Determines whether the specified is equal to the current . + Write a command to the log - The to compare with the current . - - true if the specified is equal to the current ; otherwise, false. - - The parameter is null. + - + - Serves as a hash function for a particular type. + Parses the object value. - - A hash code for the current . - + The expression. + - + - Creates a LIKE statement. + Parses the passed-in Expression into exclusive (WHERE x=y) constraints. - The val. + The exp. - + - Creates a LIKE statement and appends a wildcard to the end of the passed-in value. + Parses the passed-in Expression into exclusive (WHERE x=y) constraint. - The val. + The expression. - + - Creates a LIKE statement and appends a wildcard to the end of the passed-in value. + Determines whether the specified exp is constraint. - The val. - The wild card. - + The exp. + + true if the specified exp is constraint; otherwise, false. + - + - Creates a LIKE statement and appends a wildcard to the end of the passed-in value. + Gets the constant value. - The val. + The exp. - + - Creates a NOT LIKE statement - The val. - - + - Determines whether [is greater than] [the specified val]. + Simple implementation of the IGrouping<TKey, TElement> interface - The val. - + + - + - Determines whether [is greater than] [the specified val]. + Rewrite all column references to one or more aliases to a new single alias - The val. - - + - Specifies a SQL IN statement using a nested Select statement + MySQL specific QueryLanguage - The select query. - + - + - Specifies a SQL IN statement + A schema generator for your DB - Value array - - + - Specifies a SQL IN statement + Builds a CREATE TABLE statement. - Value array + - + - Specifies a SQL IN statement using a nested Select statement + Builds a DROP TABLE statement. - The select query. + Name of the table. - + - Specifies a SQL Not IN statement + Adds the column. - Value array - + Name of the table. + The column. - + - Specifies a SQL NOT IN statement + Alters the column. - Value array - + The column. - + - Determines whether [is less than] [the specified val]. + Removes the column. - The val. + Name of the table. + Name of the column. - + - Determines whether [is less than] [the specified val]. + Gets the type of the native. - The val. + Type of the db. - + - Determines whether [is not null] [the specified val]. + Generates the columns. - + Table containing the columns. + + SQL fragment representing the supplied columns. + - + - Determines whether the specified val is null. + Sets the column attributes. + The column. - + - Determines whether [is between and] [the specified val1]. + Builds a CREATE TABLE statement. - The val1. - The val2. + - + - Determines whether [is equal to] [the specified val]. + Builds a DROP TABLE statement. - The val. + Name of the table. - + - Determines whether [is not equal to] [the specified val]. + Adds the column. - The val. + Name of the table. + The column. - + - Gets or sets the condition. + Alters the column. - The condition. + The column. - + - Gets or sets the name of the column. + Removes the column. - The name of the column. + Name of the table. + Name of the column. + - + - Gets or sets the fully qualified name of the column. + Gets the type of the native. - The name of the column. + Type of the db. + - + - Gets or sets the string fragment used when assembling the text of query. + Generates the columns. - The construction fragment. + Table containing the columns. + + SQL fragment representing the supplied columns. + - + - Gets or sets the comparison. + Sets the column attributes. - The comparison. + The column. + - + - Gets or sets the parameter value. + Gets an ITable from the DB based on name - The parameter value. - + - Gets or sets the start value. + Creates a list of table names - The start value. - + - Gets or sets the end value. + Removes the column. - The end value. + + + - + - Gets or sets the in values. + Sets the column attributes. - The in values. + The column. + - + - Gets or sets the in select. + Gets the type of the db. - The in select. + Type of the SQL. + - + - Gets or sets the name of the parameter. + A Repository class which wraps the a Database by type - The name of the parameter. - + - Gets or sets the type of the db. + Loads a T object - The type of the db. + + The item. + The column. + The value. + - + - Gets or sets a value indicating whether this constraint is an Aggregate. + Loads a T object - - true if this instance is aggregate; otherwise, false. - + + The item. + The expression. + - + - Removes joins expressions that are identical to joins that already exist + Returns all T items - + - Moves order-bys to the outermost select if possible + Returns a single record - + - Add a sequence of order expressions to an accumulated list, prepending so as - to give precedence to the new expressions over any previous expressions + Returns a server-side Paged List - - + - Rebind order expressions to reference a new alias and add to column declarations if necessary + Returns a server-side Paged List - + - Writes out an expression tree (including DbExpression nodes) in a C#-ish syntax + Returns a server-side Paged List - + - Writes out an expression tree in a C#-ish syntax + Returns an IQueryable based on the passed-in Expression Chinook Database - + - Summary for the Numbers class + Returns an IQueryable based on the passed-in Expression Chinook Database - + - Determines whether a number is a natural number (positive, non-decimal) + Adds a T item to the db - The s item. - - true if [is natural number] [the specified s item]; otherwise, false. - - + - Determines whether [is whole number] [the specified s item]. + Adds a T item to the db - The s item. - - true if [is whole number] [the specified s item]; otherwise, false. - - - - Determines whether the specified s item is integer. + + + Adds a bunch of T items - The s item. - - true if the specified s item is integer; otherwise, false. - - - - Determines whether the specified s item is number. + + + Adds a bunch of T items - The s item. - - true if the specified s item is number; otherwise, false. - - + - Determines whether the specified value is an even number. + Updates the passed-in T - The value. - - true if the specified value is even; otherwise, false. - - + - Determines whether the specified value is an odd number. + Updates the passed-in T - The value. - - true if the specified value is odd; otherwise, false. - - + - Generates a random number with an upper bound + Updates the passed-in T - The high. - - + - Generates a random number between the specified bounds + Updates the passed-in T - The low. - The high. - - + - Generates a random double + Deletes the passed-in T items - - + - This set of classes abstracts out commands and their parameters so that - the DataProviders can work their magic regardless of the client type. The - System.Data.Common class was supposed to do this, but sort of fell flat - when it came to MySQL and other DB Providers that don't implement the Data - Factory pattern. Abstracts out the assignment of parameters, etc + Deletes the passed-in T items - + - Gets or sets the size. + Deletes the passed-in T item - The size. - + - Gets or sets the mode. + Deletes the passed-in T item - The mode. - + - Gets or sets the name of the parameter. + Deletes the T item by Primary Key - The name of the parameter. - + - Gets or sets the parameter value. + Deletes the T item by Primary Key - The parameter value. - + - Gets or sets the type of the data. + Deletes 0 to n T items from the Database based on the passed-in Expression - The type of the data. - + - Summary for the QueryParameterCollection class + Deletes 0 to n T items from the Database based on the passed-in Expression - + - Checks to see if specified parameter exists in the current collection + Finds the first sub-expression that accesses a Query<T> object - - - + - returns the specified QueryParameter, if it exists in this collection + Writes out an expression tree in a C#-ish syntax - - - + - Adds the specified parameter name. + SQLite specific QueryLanguage - Name of the parameter. - The value. - + - Adds the specified parameter name. + Indicates that a per-thread shared DbConnection object should be used the default DataProvider + (or alternativley a specific DataProvider if one is given) when communicating with the database. + This class is designed to be used within a using () {} block and in conjunction with a TransactionScope object. + It's purpose is to force a common DbConnection object to be used which has the effect of avoiding promotion + of a System.Transaction ambient Transaction to the DTC where possible. + When this class is created, it indicates to the underlying DataProvider that is should use a shared DbConnection + for subsequent operations. When the class is disposed (ie the using() {} block ends) it will indicate to the + underlying provider that it should no longer it's current shared connection and should Dispose() it. - Name of the parameter. - The value. - Type of the data. - + - Adds the specified parameter name. + Used to support nesting. By keeping a stack of all instances of the class that are created on this thread + thread we know when it is safe to Reset the underlying shared connection. - Name of the parameter. - The value. - Type of the data. - The mode. - + - Summary for the QueryCommandCollection class + Indicates to the default DataProvider that it should use a per-thread shared connection. - + - Summary for the QueryCommand class + Indicates to the default DataProvider that it should use a per-thread shared connection using the given connection string. + The connection string. + Name of the provider. - + - + Indicates to the specified DataProvider that it should use a per-thread shared connection. + The data provider. - + - Initializes a new instance of the class. + Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. - The SQL. - The provider. - + - Determines whether [has output params]. + Releases unmanaged and - optionally - managed resources - - true if [has output params]; otherwise, false. - + true to release both managed and unmanaged resources; false to release only unmanaged resources. - + - Adds the parameter. The public AddParameter methods should call this one. + Provides access to underlying connection that is shared per thread - Name of the parameter. - The parameter value. - Size of the max. - Type of the db. - The direction. + The current connection. - + - Adds the parameter. + Used within SubSonic to automatically manage a SqlConnection. If a shared connection is available + for the specified provider on the current thread, that shared connection will be used. + Otherwise, a new connection will be created. + Note that if a shared connection is used, it will NOT be automatically disposed - that is up to the caller. + Lifetime management of the shared connection is taken care of by using a + If a new connection is created, it will be automatically disposed when this AutomaticConnectionScope object + is disposed. - Name of the parameter. - The parameter value. - Type of the data. - The parameter direction. - + - Adds the parameter. + Initializes a new instance of the class. - Name of the parameter. - The parameter value. - Type of the data. + The provider. - + - Adds the parameter. + Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. - Name of the parameter. - The parameter value. - + - Adds the output parameter. + Releases unmanaged and - optionally - managed resources - Name of the parameter. - Size of the max. - Type of the db. + true to release both managed and unmanaged resources; false to release only unmanaged resources. - + - Adds the output parameter. + Gets the connection. - Name of the parameter. - Size of the max. + + - + - Adds the output parameter. + Gets the connection. - Name of the parameter. + The connection. - + - Adds the output parameter. + Gets a value indicating whether this instance is using shared connection. - Name of the parameter. - Type of the db. + + true if this instance is using shared connection; otherwise, false. + - + - Adds a return parameter (RETURN_VALUE) to the command. - + Type related helper methods - + - Suggested by feroalien@hotmail.com - Issue 11 fix + Formats a query expression into TSQL language syntax - - + - Gets or sets the command timeout (in seconds). + Formats a query expression into TSQL language syntax - The command timeout. - + - Gets or sets the type of the command. + Attempts to rewrite cross-apply and outer-apply joins as inner and left-outer joins - The type of the command. - + - Gets or sets the command SQL. + Summary for the Validation class - The command SQL. - + - Gets or sets the parameters. + Determines whether the specified eval string contains only alpha characters. - The parameters. + The eval string. + + true if the specified eval string is alpha; otherwise, false. + - + - Common interface for controlling defer-loadable types + Determines whether the specified eval string contains only alphanumeric characters + The eval string. + + true if the string is alphanumeric; otherwise, false. + - + - A list implementation that is loaded the first the contents are examined + Determines whether the specified eval string contains only alphanumeric characters - + The eval string. + if set to true [allow spaces]. + + true if the string is alphanumeric; otherwise, false. + - + - Rewrites take and skip expressions into uses of TSQL row_number function + Determines whether the specified eval string contains only numeric characters + The eval string. + + true if the string is numeric; otherwise, false. + - + - Adds relationship to query results depending on policy + Determines whether the specified email address string is valid based on regular expression evaluation. + The email address string. + + true if the specified email address is valid; otherwise, false. + - + - Converts user arguments into named-value parameters + Determines whether the specified string is lower case. + The input string. + + true if the specified string is lower case; otherwise, false. + - + - Result from calling ColumnProjector.ProjectColumns + Determines whether the specified string is upper case. + The input string. + + true if the specified string is upper case; otherwise, false. + - + - Splits an expression into two parts - 1) a list of column declarations for sub-expressions that must be evaluated on the server - 2) a expression that describes how to combine/project the columns back together into the correct result + Determines whether the specified string is a valid GUID. + The GUID. + + true if the specified string is a valid GUID; otherwise, false. + - + - Nominator is a class that walks an expression tree bottom up, determining the set of - candidate expressions that are possible columns of a select expression + Determines whether the specified string is a valid US Zip Code, using either 5 or 5+4 format. + The zip code. + + true if it is a valid zip code; otherwise, false. + - + - Summary for the Files class + Determines whether the specified string is a valid US Zip Code, using the 5 digit format. + The zip code. + + true if it is a valid zip code; otherwise, false. + - + - Read a text file and obtain it's contents. + Determines whether the specified string is a valid US Zip Code, using the 5+4 format. - The complete file path to write to. - String containing the content of the file. + The zip code. + + true if it is a valid zip code; otherwise, false. + - + - Creates or opens a file for writing and writes text to it. + Determines whether the specified string is a valid Social Security number. Dashes are optional. - The complete file path to write to. - A String containing text to be written to the file. + The Social Security Number + + true if it is a valid Social Security number; otherwise, false. + - + - Update text within a file by replacing a substring within the file. + Determines whether the specified string is a valid IP address. - The complete file path to write to. - A String to be replaced. - A String to replace all occurrences of lookFor. + The ip address. + + true if valid; otherwise, false. + - + - Writes out a string to a file. + Determines whether the specified string is a valid US phone number using the referenced regex string. - The complete file path to write to. - A String containing text to be written to the file. + The telephone number. + + true if valid; otherwise, false. + - + - Fetches a web page + Determines whether the specified string is a valid currency string using the referenced regex string. - The URL. - + The currency string. + + true if valid; otherwise, false. + - + - A holder for 1 or more queries to be executed together + Determines whether the specified string is a valid URL string using the referenced regex string. + The URL string. + + true if valid; otherwise, false. + - + - Builds the SQL statement. + Determines whether the specified string is consider a strong password based on the supplied string. - + The password. + + true if strong; otherwise, false. + - + - Executes this instance. + Determines whether the specified string is a valid credit, based on matching any one of the eight credit card strings - + The credit card. + + true if valid; otherwise, false. + - + - Executes the queries in and returns a multiple result set reader. + Determines whether the specified string is an American Express, Discover, MasterCard, or Visa - + The credit card. + + true if valid; otherwise, false. + - + - Gets a command containing all the queued queries. + Determines whether the specified string is an American Express card - + The credit card. + + true if valid; otherwise, false. + - + - Queues the specified query. + Determines whether the specified string is an Carte Blanche card - The query. + The credit card. + + true if valid; otherwise, false. + - + - Queues the specified query. + Determines whether the specified string is an Diner's Club card - - The query. + The credit card. + + true if valid; otherwise, false. + - + - Queues a query for use in a transaction. + Determines whether the specified string is a Discover card - The qry. + The credit card. + + true if valid; otherwise, false. + - + - Queues a query for use in a transaction. + Determines whether the specified string is an En Route card - The CMD. + The credit card. + + true if valid; otherwise, false. + - + - Queues a query for use in a transaction. + Determines whether the specified string is an JCB card - The SQL. - The parameters. + The credit card. + + true if valid; otherwise, false. + - + - Executes the transaction. + Determines whether the specified string is a Master Card credit card + The credit card. + + true if valid; otherwise, false. + - + - Enum for General SQL Functions + Determines whether the specified string is Visa card. + The credit card. + + true if valid; otherwise, false. + - + - + Cleans the credit card number, returning just the numeric values. + The credit card. + - + - Counts the specified col. + Determines whether the credit card number, once cleaned, passes the Luhn algorith. + See: http://en.wikipedia.org/wiki/Luhn_algorithm - The col. + The credit card number. - + - Counts the specified col. + Determines whether the specified int array passes the Luhn algorith - The col. - The alias. - + The int array to evaluate + + true if it validates; otherwise, false. + - + - Counts the specified column name. + Determine whether the passed string is numeric, by attempting to parse it to a double - Name of the column. - + The string to evaluated for numeric conversion + + true if the string can be converted to a number; otherwise, false. + - + - Counts the specified column name. + Builds the delete query. - Name of the column. - The alias. + The item. - + - Sums the specified col. + Builds the insert query. - The col. + The item. - + - Sums the specified column name. + Builds the update query. - Name of the column. + The item. - + - Sums the specified col. + Duplicate the query expression by making a copy with new table aliases - The col. - The alias. - - + - Sums the specified column name. + Writes out an expression tree (including DbExpression nodes) in a C#-ish syntax - Name of the column. - The alias. - - + - Groups the by. + Gets a value indicating whether this instance is numeric. - The col. - + + true if this instance is numeric; otherwise, false. + - + - Groups the by. + Gets a value indicating whether this instance is date time. - Name of the column. - + + true if this instance is date time; otherwise, false. + - + - Groups the by. + Gets a value indicating whether this instance is string. - The col. - The alias. - + true if this instance is string; otherwise, false. - + - Groups the by. + - Name of the column. - The alias. - + - + - Avgs the specified col. + Initializes a new instance of the class. - The col. - + The query. - + - Avgs the specified column name. + Gets the type of the native. - Name of the column. + Type of the db. - + - Avgs the specified col. + Generates SQL for all the columns in table - The col. - The alias. - + Table containing the columns. + + SQL fragment representing the supplied columns. + - + - Avgs the specified column name. + Generates from list. - Name of the column. - The alias. - + - Maxes the specified col. + Sets the column attributes. - The col. + The column. - + - Maxes the specified column name. + Builds the paged select statement. - Name of the column. - + - Maxes the specified col. + Creates a set of SQL commands for synchronizing your database with your object set - The col. - The alias. - - + - Maxes the specified column name. + Creates a reusable, parameterized representation of a query that caches the execution plan - Name of the column. - The alias. - - + - Mins the specified col. + Common interface for controlling defer-loadable types - The col. - - + - Mins the specified column name. + A list implementation that is loaded the first the contents are examined - Name of the column. - + - + - Mins the specified col. + Holds list of tables, views, stored procedures, etc. - The col. - The alias. - - + - Mins the specified column name. + Initializes the shared connection. - Name of the column. - The alias. - + - Variances the specified col. + Initializes the shared connection. - The col. + The shared connection string. - + - Variances the specified column name. + Resets the shared connection. - Name of the column. - - + - Variances the specified col. + Adds the params. - The col. - The alias. - + The CMD. + The qry. - + - Variances the specified column name. + Converts a data reader into a sequence of objects using a projector function on each row - Name of the column. - The alias. + + The reader. + The fn projector. - + - Standards the deviation. + Gets a value indicating whether [current connection string is default]. - The col. - + + true if [current connection string is default]; otherwise, false. + - + - Standards the deviation. + Gets or sets the current shared connection. - Name of the column. - + The current shared connection. - + - Standards the deviation. + Gets the type of the native. - The col. - The alias. + Type of the db. - + - Standards the deviation. + Generates the columns. - Name of the column. - The alias. - + Table containing the columns. + + SQL fragment representing the supplied columns. + - + - Initializes a new instance of the class. + Builds a CREATE TABLE statement. - Name of the column. - Type of the aggregate. + + - + - Initializes a new instance of the class. + Sets the column attributes. - Name of the column. - The alias. - Type of the aggregate. + The column. + - + - Initializes a new instance of the class. + Gets the type of the db. - The column. - Type of the aggregate. + Type of my SQL. + - + - Initializes a new instance of the class. + - The column. - The alias. - Type of the aggregate. - + - Gets the type of the function. + Equals to. - The agg. + The value. - + - Gets the SQL function call without an alias. Example: AVG(UnitPrice). + Determines whether the specified is equal to the current . - + The to compare with the current . + + true if the specified is equal to the current ; otherwise, false. + + The parameter is null. - + - Overrides ToString() to return the SQL Function call + Serves as a hash function for a particular type. - + + A hash code for the current . + - + - Gets or sets the type of the aggregate. + Returns a that represents the current . - The type of the aggregate. + + A that represents the current . + - + - Gets or sets the name of the column. + Initializes a new instance of the class. - The name of the column. - + - Gets or sets the alias. + Initializes a new instance of the class. - The alias. + The table. - + - returns the set of all aliases produced by a query source + Sets the specified column name. + Name of the column. + - + - Translates accesses to relationship members into projections or joins + Sets the expression. + The column. + - + - Defines query execution and materialization policies. + Executes this instance. + - + - Determines if a relationship property is to be included in the results of the query + - - - + - Determines if a relationship property is included, but the query for the related data is - deferred until the property is first accessed. + Initializes a new instance of the class. - - + The provider. - + - Provides policy specific query translations. This is where choices about inclusion of related objects and how - heirarchies are materialized affect the definition of the queries. + Sets the specified columns. - + The columns. - + - Converts a query into an execution plan. The plan is an function that executes the query and builds the - resulting objects. + Rewrites nested singleton projection into server-side joins - - + + + + A simple query mapping that attempts to infer mapping from naming conventionss + + + + + Defines mapping information and rules for the query provider + + + + + Determines if a give CLR type is mapped as a database entity + + - + - The mapping related to the policy. + Deterimines is a property is mapped onto a column or relationship + + - + - Determines if two expressions are equivalent. Supports DbExpression nodes. + Determines if a property is mapped onto a column + + - + - Compare two expressions to determine if they are equivalent + Determines if a property represents or is part of the entities unique identity (often primary key) + + + + + + + Determines if a property is mapped as a relationship + + + + + + + The type of the entity on the other side of the relationship + + + + + + + The name of the corresponding database table + + + + + + + The name of the corresponding table column + + + + + + + A sequence of all the mapped members + + + + + + + Determines if a relationship property refers to a single optional entity (as opposed to a collection.) + + + + + + + Get a query expression that selects all entities from a table + + + + + + + Gets an expression that constructs an entity instance relative to a root. + The root is most often a TableExpression, but may be any other experssion such as + a ConstantExpression. + + + + + + + + Get the members for the key properities to be joined in an association relationship + + + + + + + + Get an expression for a mapped property relative to a root expression. + The root is either a TableExpression or an expression defining an entity instance. + + + + + + + + Get a function that coerces an a sequence of one type into another type. + This is primarily used for aggregators stored in ProjectionExpression's, which are used to represent the + final transformation of the entire result set of a query. + + The expected type. + The actual type. + + + + + Apply mapping translations to this expression + + + + + + + The language related to the mapping @@ -2621,14 +2788,16 @@ true if [is core system type] [the specified type]; otherwise, false. - + Coerces an IDataReader to load an enumerable of T + + Invoked when a new item is created - + Creates a typed list from an IDataReader @@ -2648,1724 +2817,1455 @@ Builds a SubSonic DELETE query from the passed-in object - + - Gets the type of the native. + Sets the column attributes. - Type of the db. + The column. - + - Generates the columns. + Gets the type of the db. - Table containing the columns. - - SQL fragment representing the supplied columns. - + Type of the SQL. + - + - Builds a CREATE TABLE statement. + - - - + - Sets the column attributes. + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + The provider. + + + + Builds the SQL statement. - The column. - + - Gets the type of the db. + Adds the specified columns into a new Insert object. - Type of my SQL. + + The columns. - + - Simple implementation of the IGrouping<TKey, TElement> interface + Adds the specified columns into a new Insert object. - - + + The TBL. + - + - Rewrite aggregate expressions, moving them into same select expression that has the group-by clause + Inits this instance. + - + - Replaces references to one specific instance of an expression node with another node. - Supports DbExpression nodes + Values the specified column. + The column. + The column value. + - + - Parses the object value. + Values the specified column. - The expression. + The column. + The column value. + Type of the db. - + - Parses the passed-in Expression into exclusive (WHERE x=y) constraints. + Valueses the specified values. - The exp. + The values. - + - Parses the passed-in Expression into exclusive (WHERE x=y) constraint. + Values the expression. - The expression. + The values. - + - Determines whether the specified exp is constraint. + Returns a that represents the current . - The exp. - true if the specified exp is constraint; otherwise, false. + A that represents the current . - + - Gets the constant value. + Executes this instance. - The exp. - + - Indicates that a per-thread shared DbConnection object should be used the default DataProvider - (or alternativley a specific DataProvider if one is given) when communicating with the database. - This class is designed to be used within a using () {} block and in conjunction with a TransactionScope object. - It's purpose is to force a common DbConnection object to be used which has the effect of avoiding promotion - of a System.Transaction ambient Transaction to the DTC where possible. - When this class is created, it indicates to the underlying DataProvider that is should use a shared DbConnection - for subsequent operations. When the class is disposed (ie the using() {} block ends) it will indicate to the - underlying provider that it should no longer it's current shared connection and should Dispose() it. + rewrites nested projections into client-side joins - + - Used to support nesting. By keeping a stack of all instances of the class that are created on this thread - thread we know when it is safe to Reset the underlying shared connection. + Formats a query expression into TSQL language syntax - + - Indicates to the default DataProvider that it should use a per-thread shared connection. + Where, And, Or - + - Indicates to the default DataProvider that it should use a per-thread shared connection using the given connection string. + WHERE operator - The connection string. - Name of the provider. - + - Indicates to the specified DataProvider that it should use a per-thread shared connection. + AND operator - The data provider. - + - Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. + OR Operator - + - Releases unmanaged and - optionally - managed resources + SQL Comparison Operators - true to release both managed and unmanaged resources; false to release only unmanaged resources. - + - Provides access to underlying connection that is shared per thread + Summary for the SqlComparison class - The current connection. - + - Used within SubSonic to automatically manage a SqlConnection. If a shared connection is available - for the specified provider on the current thread, that shared connection will be used. - Otherwise, a new connection will be created. - Note that if a shared connection is used, it will NOT be automatically disposed - that is up to the caller. - Lifetime management of the shared connection is taken care of by using a - If a new connection is created, it will be automatically disposed when this AutomaticConnectionScope object - is disposed. + A Class for handling SQL Constraint generation - + - Initializes a new instance of the class. + The query that this constraint is operating on - The provider. - + - Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. + Initializes a new instance of the class. + The condition. + Name of the constraint column. - + - Releases unmanaged and - optionally - managed resources + Initializes a new instance of the class. - true to release both managed and unmanaged resources; false to release only unmanaged resources. + The condition. + Name of the constraint column. + Name of the constraint qualified column. - + - Gets the connection. + Initializes a new instance of the class. - - + The condition. + Name of the constraint column. + Name of the constraint qualified column. + The constraint construction fragment. - + - Gets the connection. + Initializes a new instance of the class. - The connection. + The condition. + Name of the constraint column. + The SQL query. - + - Gets a value indicating whether this instance is using shared connection. + Initializes a new instance of the class. - - true if this instance is using shared connection; otherwise, false. - + The condition. + Name of the constraint column. + Name of the constraint qualified column. + The constraint construction fragment. + The SQL query. - + - A basic abstract LINQ query provider + Wheres the specified column name. + Name of the column. + - + - Optional interface for IQueryProvider to implement Query<T>'s QueryText property. + Ands the specified column name. + Name of the column. + - + - A LINQ IQueryable query provider that executes database queries over a DbConnection + Ors the specified column name. + Name of the column. + - + - DbQueryProvider constrcutor that allows for external control of policy - to allow for new types of databases. + Gets or sets the name of the table. + The name of the table. - + - Converts the query expression into text that corresponds to the command that would be executed. - Useful for debugging. + Gets the comparison operator. - + The comp. - + - Execute the query expression (does translation, etc.) + Determines whether the specified is equal to the current . - - + The to compare with the current . + + true if the specified is equal to the current ; otherwise, false. + + The parameter is null. - + - Convert the query expression into an execution plan + Serves as a hash function for a particular type. - - + + A hash code for the current . + - + - Do all query translations execpt building the execution plan + Creates a LIKE statement. - + The val. - + - Determines whether a given expression can be executed locally. - (It contains no parts that should be translated to the target environment.) + Creates a LIKE statement and appends a wildcard to the end of the passed-in value. - + The val. - + - Execute an actual query specified in the target language using the sADO connection + Creates a LIKE statement and appends a wildcard to the end of the passed-in value. - - - + The val. + The wild card. - + - Converts a data reader into a sequence of objects using a projector function on each row + Creates a LIKE statement and appends a wildcard to the end of the passed-in value. - - The reader. - The fn projector. + The val. - + - Get an IEnumerable that will execute the specified query when enumerated + Creates a NOT LIKE statement - - - + The val. - + - Get an ADO command object initialized with the command-text and parameters + Determines whether [is greater than] [the specified val]. - - - + The val. - + - Write a command to the log + Determines whether [is greater than] [the specified val]. - + The val. + - + - Summary for the SqlFragment class + Specifies a SQL IN statement using a nested Select statement + The select query. + - + - + Specifies a SQL IN statement + Value array + - + - Initializes a new instance of the class. + Specifies a SQL IN statement - The provider. + Value array + - + - Validates the query. + Specifies a SQL IN statement using a nested Select statement + The select query. + - + - Finds the column. + Specifies a SQL Not IN statement - Name of the column. + Value array - + - Wheres the specified column name. + Specifies a SQL NOT IN statement - Name of the column. + Value array - + - Wheres the specified column. + Determines whether [is less than] [the specified val]. - The column. + The val. - + - Wheres the specified agg. + Determines whether [is less than] [the specified val]. - The agg. + The val. - + - Ors the specified column name. + Determines whether [is not null] [the specified val]. - Name of the column. - + - Ors the specified column. + Determines whether the specified val is null. - The column. - + - Ors the specified agg. + Determines whether [is between and] [the specified val1]. - The agg. + The val1. + The val2. - + - Ors the expression. + Determines whether [is equal to] [the specified val]. - Name of the column. + The val. - + - Opens the expression. + Determines whether [is not equal to] [the specified val]. + The val. - + - Closes the expression. + Gets or sets the condition. - + The condition. - + - Ands the specified column name. + Gets or sets the name of the column. - Name of the column. - + The name of the column. - + - Ands the specified column. + Gets or sets the fully qualified name of the column. - The column. - + The name of the column. - + - Ands the specified agg. + Gets or sets the string fragment used when assembling the text of query. - The agg. - + The construction fragment. - + - Ands the expression. + Gets or sets the comparison. - Name of the column. - + The comparison. - + - Returns the currently set SQL statement for this query object + Gets or sets the parameter value. - + The parameter value. - + - Builds the SQL statement. + Gets or sets the start value. - + The start value. - + - Froms the specified TBL. + Gets or sets the end value. - The TBL. - + The end value. - + - Froms the specified TBL. + Gets or sets the in values. - Name of the table. - + The in values. - + - Froms the specified TBL. + Gets or sets the in select. - - + The in select. - + - Creates an inner join based on the passed-in column names + Gets or sets the name of the parameter. - - - - + The name of the parameter. - + - Creates an Inner Join, guessing based on Primary Key matching + Gets or sets the type of the db. - - + The type of the db. - + - Inners the join. + Gets or sets a value indicating whether this constraint is an Aggregate. - From column. - To column. - + + true if this instance is aggregate; otherwise, false. + - + - Outers the join. + Translates accesses to relationship members into projections or joins - From column. - To column. - - + - Crosses the join. + Defines query execution and materialization policies. - From column. - To column. - - + - Lefts the inner join. + Determines if a relationship property is to be included in the results of the query - From column. - To column. + - + - Rights the inner join. + Determines if a relationship property is included, but the query for the related data is + deferred until the property is first accessed. - From column. - To column. + - + - Lefts the outer join. + Provides policy specific query translations. This is where choices about inclusion of related objects and how + heirarchies are materialized affect the definition of the queries. - From column. - To column. + - + - Rights the outer join. + Converts a query into an execution plan. The plan is an function that executes the query and builds the + resulting objects. - From column. - To column. + + - + - Nots the equal join. + The mapping related to the policy. - From column. - To column. - - + - Orders the asc. + Determines if two expressions are equivalent. Supports DbExpression nodes. - The columns. - - + - Orders the desc. + Compare two expressions to determine if they are equivalent - The columns. - - + - Pageds the specified current page. + Returns an Object with the specified Type and whose value is equivalent to the specified object. - The current page. - Size of the page. - + An Object that implements the IConvertible interface. + + An object whose Type is conversionType (or conversionType's underlying type if conversionType + is Nullable<>) and whose value is equivalent to value. -or- a null reference, if value is a null + reference and conversionType is not a value type. + + + This method exists as a workaround to System.Convert.ChangeType(Object, Type) which does not handle + nullables as of version 2.0 (2.0.50727.42) of the .NET Framework. The idea is that this method will + be deleted once Convert.ChangeType is updated in a future version of the .NET Framework to handle + nullable types, so we want this to behave as closely to Convert.ChangeType as possible. + This method was written by Peter Johnson at: + http://aspalliance.com/author.aspx?uId=1026. + + - + - Pageds the specified current page. + Executes the specified SQL. - The current page. - Size of the page. - The id column. - - + - Executes this instance. + Executes the scalar. + The type of the result. - + - Executes the reader. + Executes the typed list. + - + - Executes the scalar. + Executes the reader. - + - Executes the scalar. + Rewrites an expression tree so that locally isolatable sub-expressions are evaluated and converted into ConstantExpression nodes. - The type of the result. - - + - Gets the record count. + Performs evaluation and replacement of independent sub-trees - + The root of the expression tree. + A function that decides whether a given expression node can be part of the local function. + A new tree with sub-trees evaluated and replaced. - + - Executes the typed list. + Performs evaluation and replacement of independent sub-trees - - + The root of the expression tree. + A new tree with sub-trees evaluated and replaced. - + - Executes the typed list. + Evaluates and replaces sub-trees when first candidate is reached (top-down) - - - + - Executes the query and returns the result as a single item of T + Performs bottom-up analysis to determine which nodes can possibly + be part of an evaluated sub-tree. - The type of item to return - + - Executes the transaction. + Removes select expressions that don't add any additional semantic value - The queries. - + - Executes the transaction. + Replaces references to one specific instance of an expression node with another node. + Supports DbExpression nodes - The queries. - Name of the connection string. - + - Gets or sets the open paren count. + Converts the string method calls Contains,EndsWith and StartsWith into queries - The open paren count. + The MethodCall we are attempting to map to a query. + an expression tree. - + - Gets or sets the closed paren count. + A holder for 1 or more queries to be executed together - The closed paren count. - - - - - - - - - Initializes a new instance of the class. - - The query. - + - Builds the paged select statement. + Builds the SQL statement. - + - Builds the insert statement. + Executes this instance. - - - - - - - - Initializes a new instance of the class. - - - - - Initializes a new instance of the class. - - The table. - The provider. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - A default implementation of IQueryable for use with QueryProvider - - - - - Duplicate the query expression by making a copy with new table aliases - - - - - Summary for the Validation class - - - - - Determines whether the specified eval string contains only alpha characters. - - The eval string. - - true if the specified eval string is alpha; otherwise, false. - - - - - Determines whether the specified eval string contains only alphanumeric characters - - The eval string. - - true if the string is alphanumeric; otherwise, false. - - - - - Determines whether the specified eval string contains only alphanumeric characters - - The eval string. - if set to true [allow spaces]. - - true if the string is alphanumeric; otherwise, false. - - - - - Determines whether the specified eval string contains only numeric characters - - The eval string. - - true if the string is numeric; otherwise, false. - - - - - Determines whether the specified email address string is valid based on regular expression evaluation. - - The email address string. - - true if the specified email address is valid; otherwise, false. - - - - - Determines whether the specified string is lower case. - - The input string. - - true if the specified string is lower case; otherwise, false. - - - - - Determines whether the specified string is upper case. - - The input string. - - true if the specified string is upper case; otherwise, false. - - - - - Determines whether the specified string is a valid GUID. - - The GUID. - - true if the specified string is a valid GUID; otherwise, false. - - - - - Determines whether the specified string is a valid US Zip Code, using either 5 or 5+4 format. - - The zip code. - - true if it is a valid zip code; otherwise, false. - - - - - Determines whether the specified string is a valid US Zip Code, using the 5 digit format. - - The zip code. - - true if it is a valid zip code; otherwise, false. - - - - - Determines whether the specified string is a valid US Zip Code, using the 5+4 format. - - The zip code. - - true if it is a valid zip code; otherwise, false. - - - - - Determines whether the specified string is a valid Social Security number. Dashes are optional. - - The Social Security Number - - true if it is a valid Social Security number; otherwise, false. - - - - - Determines whether the specified string is a valid IP address. - - The ip address. - - true if valid; otherwise, false. - - - - - Determines whether the specified string is a valid US phone number using the referenced regex string. - - The telephone number. - - true if valid; otherwise, false. - - - - - Determines whether the specified string is a valid currency string using the referenced regex string. - - The currency string. - - true if valid; otherwise, false. - - - - - Determines whether the specified string is a valid URL string using the referenced regex string. - - The URL string. - - true if valid; otherwise, false. - - - - - Determines whether the specified string is consider a strong password based on the supplied string. - - The password. - - true if strong; otherwise, false. - - - - - Determines whether the specified string is a valid credit, based on matching any one of the eight credit card strings - - The credit card. - - true if valid; otherwise, false. - - - - - Determines whether the specified string is an American Express, Discover, MasterCard, or Visa - - The credit card. - - true if valid; otherwise, false. - - - - - Determines whether the specified string is an American Express card - - The credit card. - - true if valid; otherwise, false. - - - - - Determines whether the specified string is an Carte Blanche card - - The credit card. - - true if valid; otherwise, false. - - - - - Determines whether the specified string is an Diner's Club card - - The credit card. - - true if valid; otherwise, false. - - - + - Determines whether the specified string is a Discover card + Executes the queries in and returns a multiple result set reader. - The credit card. - - true if valid; otherwise, false. - + - + - Determines whether the specified string is an En Route card + Gets a command containing all the queued queries. - The credit card. - - true if valid; otherwise, false. - + - + - Determines whether the specified string is an JCB card + Queues the specified query. - The credit card. - - true if valid; otherwise, false. - + The query. - + - Determines whether the specified string is a Master Card credit card + Queues the specified query. - The credit card. - - true if valid; otherwise, false. - + + The query. - + - Determines whether the specified string is Visa card. + Queues a query for use in a transaction. - The credit card. - - true if valid; otherwise, false. - + The qry. - + - Cleans the credit card number, returning just the numeric values. + Queues a query for use in a transaction. - The credit card. - + The CMD. - + - Determines whether the credit card number, once cleaned, passes the Luhn algorith. - See: http://en.wikipedia.org/wiki/Luhn_algorithm + Queues a query for use in a transaction. - The credit card number. - + The SQL. + The parameters. - + - Determines whether the specified int array passes the Luhn algorith + Executes the transaction. - The int array to evaluate - - true if it validates; otherwise, false. - - + - Determine whether the passed string is numeric, by attempting to parse it to a double + Rewrites take and skip expressions into uses of TSQL row_number function - The string to evaluated for numeric conversion - - true if the string can be converted to a number; otherwise, false. - - + - Executes the specified SQL. + returns the list of SelectExpressions accessible from the source expression - + - Executes the scalar. + Builds an execution plan for a query expression - The type of the result. - - + - Executes the typed list. + columns referencing the outer alias are turned into special named-value parameters - - - + - Executes the reader. + Initializes the class. - - + - Type related helper methods + Strips the last specified chars from a string. + The source string. + The remove from end. + - + - + Strips the last specified chars from a string. + The source string. + The back down to. + - + - Initializes a new instance of the class. + Plurals to singular. - The provider. - The columns. + The source string. + - + - Initializes a new instance of the class. + Singulars to plural. + The source string. + - + - Initializes a new instance of the class. + Make plural when count is not one - The aggregates. + The number of things + The source string. + - + - Initializes a new instance of the class. + Removes the specified chars from the beginning of a string. - The provider. - The aggregates. + The source string. + The remove from beginning. + - + - Initializes a new instance of the class. + Removes chars from the beginning of a string, up to the specified string - The columns. + The source string. + The remove up to. + - + - Initializes a new instance of the class. - WARNING: This overload should only be used with applications that use a single provider! + Strips the last char from a a string. - The columns. + The source string. + - + - Alls the columns from. + Strips the last char from a a string. - + The source string. - + - Expressions the specified SQL expression. + Fasts the replace. - The SQL expression. + The original. + The pattern. + The replacement. - + - Tops the specified top. + Fasts the replace. - The top. + The original. + The pattern. + The replacement. + Type of the comparison. - + - Removes the column. + Returns text that is located between the startText and endText tags. - - + The source string. + The text from which to start the crop + The endpoint of the crop - + - Sets the column attributes. + Removes excess white space in a string. - The column. + The source string. - + - Gets the type of the db. + Removes all non-alpha numeric characters in a string - Type of the SQL. + The source string. - + - Type related helper methods + Creates a string array based on the words in a sentence + The source string. + - + - Replaces references to one specific instance of an expression node with another node + Strips all HTML tags from a string + The HTML string. + - + - TSQL specific QueryLanguage + Strips all HTML tags from a string and replaces the tags with the specified replacement + The HTML string. + The HTML place holder. + - + - returns the set of all aliases produced by a query source + Converts a generic List collection to a single comma-delimitted string. + The list. + - + - Creates a set of SQL commands for synchronizing your database with your object set + Converts a generic List collection to a single string using the specified delimitter. + The list. + The delimiter. + - + - Builds the delete query. + Strips the specified input. - The item. + The source string. + The strip value. - + - Builds the insert query. + Converts ASCII encoding to Unicode - The item. + The ASCII code. - + - Builds the update query. + Converts Text to HTML-encoded string - The item. + The text string. - + - Creates a reusable, parameterized representation of a query that caches the execution plan + Converts HTML-encoded bits to Text + The entity text. + - + - Summary for the Dates class + Formats the args using String.Format with the target string as a format string. + The format string passed to String.Format + The args passed to String.Format + - + - Returns a date in the past by days. + Strings to enum. - The days. + + The value. - + - Returns a date in the future by days. + Fills the entities. - The days. - - + - Returns a date in the past by hours. + Converts US State Name to it's two-character abbreviation. Returns null if the state name was not found. - The hours. + US State Name (ie Texas) - + - Returns a date in the future by hours. + Converts a two-character US State Abbreviation to it's official Name Returns null if the abbreviation was not found. - The hours. + US State Name (ie Texas) - + - Returns a date in the past by minutes + Fills the US States. - The minutes. - - + - Returns a date in the future by minutes. + Summary for the RegexPattern class - The minutes. - - + - Gets a date in the past according to seconds + Removes column declarations in SelectExpression's that are not referenced - The seconds. - - + - Gets a date in the future by seconds. + A default implementation of IQueryable for use with QueryProvider - The seconds. - - + - Diffs the specified date. + Replaces references to one specific instance of an expression node with another node - The date one. - The date two. - - + - Returns a double indicating the number of days between two dates (past is negative) + TSQL specific QueryLanguage - The date one. - The date two. - - + - Returns a double indicating the number of days between two dates (past is negative) + Removes column declarations in SelectExpression's that are not referenced - The date one. - The date two. - - + - Returns a double indicating the number of days between two dates (past is negative) + Converts LINQ query operators to into custom DbExpression's - The date one. - The date two. - - + - Returns a double indicating the number of days between two dates (past is negative) + Rewrite aggregate expressions, moving them into same select expression that has the group-by clause - The date one. - The date two. - - + - Returns a double indicating the number of days between two dates (past is negative) + Removes joins expressions that are identical to joins that already exist - The date one. - The date two. - - + - Returns a double indicating the number of days between two dates (past is negative) + Removes duplicate column declarations that refer to the same underlying column - The date one. - The date two. - - + - Displays the difference in time between the two dates. Return example is "12 years 4 months 24 days 8 hours 33 minutes 5 seconds" + Extended node types for custom expressions - The start time. - The end time. - - + - Counts the number of weekdays between two dates. + A custom expression node that represents a table reference in a SQL query - The start time. - The end time. - - + - Counts the number of weekends between two dates. + A custom expression node that represents a reference to a column in a SQL query - The start time. - The end time. - - + - Verifies if the object is a date + A declaration of a column in a SQL SELECT expression - The dt. - - true if the specified dt is date; otherwise, false. - - + - Checks to see if the date is a week day (Mon - Fri) + An SQL OrderBy order type - The dt. - - true if [is week day] [the specified dt]; otherwise, false. - - + - Checks to see if the date is Saturday or Sunday + A pairing of an expression and an order type for use in a SQL Order By clause - The dt. - - true if [is week end] [the specified dt]; otherwise, false. - - + - Displays the difference in time between the two dates. Return example is "12 years 4 months 24 days 8 hours 33 minutes 5 seconds" + A custom expression node used to represent a SQL SELECT expression - The start time. - The end time. - - + - Given a datetime object, returns the formatted month and day, i.e. "April 15th" + A kind of SQL join - The date to extract the string from - - + - Given a datetime object, returns the formatted day, "15th" + A custom expression node representing a SQL join clause - The date to extract the string from - - + - Remove leading strings with zeros and adjust for singular/plural + Allows is-null tests against value-types like int and float - The STR. - The previous STR. - The t. - - + - An enumeration value for no options configured. + A custom expression representing the construction of one or more result objects from a + SQL select expression - + - The default set of options (right now the same as none). + For Jeff Atwood + http://www.codinghorror.com/blog/archives/000989.html + + + A class which wraps an inline SQL call - + - Use this flag to let the repository run migrations. + Initializes a new instance of the class. + Warning: This method assumes the default provider is intended. + Call InlineQuery(string providerName) if this is not the case. + The SQL. - + - + Initializes a new instance of the class. + The SQL. + The values. - + - + Initializes a new instance of the class. + The provider. - + - + Gets the command. + - + - Removes select expressions that don't add any additional semantic value + Executes the specified SQL. - + - Rewrite all column references to one or more aliases to a new single alias + Executes the scalar. + The type of the result. + - + - Summary for the Inflector class + Executes the typed list. + + - + - Initializes the class. + Executes the reader. + - + - Adds the irregular rule. + Adds relationship to query results depending on policy - The singular. - The plural. - + - Adds the unknown count rule. + Converts user arguments into named-value parameters - The word. - + - Adds the plural rule. + Summary for the Numbers class - The rule. - The replacement. - + - Adds the singular rule. + Determines whether a number is a natural number (positive, non-decimal) - The rule. - The replacement. + The s item. + + true if [is natural number] [the specified s item]; otherwise, false. + - + - Makes the plural. + Determines whether [is whole number] [the specified s item]. - The word. - + The s item. + + true if [is whole number] [the specified s item]; otherwise, false. + - + - Makes the singular. + Determines whether the specified s item is integer. - The word. - + The s item. + + true if the specified s item is integer; otherwise, false. + - + - Applies the rules. + Determines whether the specified s item is number. - The rules. - The word. - + The s item. + + true if the specified s item is number; otherwise, false. + - + - Converts the string to title case. + Determines whether the specified value is an even number. - The word. - + The value. + + true if the specified value is even; otherwise, false. + - + - Converts the string to human case. + Determines whether the specified value is an odd number. - The lowercase and underscored word. - + The value. + + true if the specified value is odd; otherwise, false. + - + - Convert string to proper case + Generates a random number with an upper bound - The source string. + The high. - + - Converts the string to pascal case. + Generates a random number between the specified bounds - The lowercase and underscored word. + The low. + The high. - + - Converts text to pascal case... + Generates a random double - The text. - if set to true [remove underscores]. - + - Converts the string to camel case. + Process the passed-in LINQ expression - The lowercase and underscored word. - + - + - Adds the underscores. + Gets a value indicating whether this instance is numeric. - The pascal cased word. - + + true if this instance is numeric; otherwise, false. + - + - Makes the initial caps. + Gets a value indicating whether this instance is date time. - The word. - + + true if this instance is date time; otherwise, false. + - + - Makes the initial lower case. + Gets a value indicating whether this instance is string. - The word. - + true if this instance is string; otherwise, false. - + - Adds the ordinal suffix. + Summary for the ReservedColumnName class - The number. - - + - Converts the underscores to dashes. + This set of classes abstracts out commands and their parameters so that + the DataProviders can work their magic regardless of the client type. The + System.Data.Common class was supposed to do this, but sort of fell flat + when it came to MySQL and other DB Providers that don't implement the Data + Factory pattern. Abstracts out the assignment of parameters, etc - The underscored word. - - + - Summary for the InflectorRule class + Gets or sets the size. + The size. - + - + Gets or sets the mode. + The mode. - + - + Gets or sets the name of the parameter. + The name of the parameter. - + - Initializes a new instance of the class. + Gets or sets the parameter value. - The regex pattern. - The replacement text. + The parameter value. - + - Applies the specified word. + Gets or sets the type of the data. - The word. - + The type of the data. - + - Process the passed-in LINQ expression + Summary for the QueryParameterCollection class - - + - Sets the column attributes. + Checks to see if specified parameter exists in the current collection - The column. + - + - Gets the type of the db. + returns the specified QueryParameter, if it exists in this collection - Type of the SQL. + - + - A Repository class which wraps the a Database by type + Adds the specified parameter name. + Name of the parameter. + The value. - + - Loads a T object + Adds the specified parameter name. - - The item. - The column. + Name of the parameter. The value. - + Type of the data. - + - Loads a T object + Adds the specified parameter name. - - The item. - The expression. - + Name of the parameter. + The value. + Type of the data. + The mode. - + - Returns all T items + Summary for the QueryCommandCollection class - + - Returns a single record + Summary for the QueryCommand class - + - Returns a server-side Paged List + - + - Returns a server-side Paged List + Initializes a new instance of the class. + The SQL. + The provider. - + - Returns a server-side Paged List + Determines whether [has output params]. + + true if [has output params]; otherwise, false. + - + - Returns an IQueryable based on the passed-in Expression Chinook Database + Adds the parameter. The public AddParameter methods should call this one. + Name of the parameter. + The parameter value. + Size of the max. + Type of the db. + The direction. - + - Returns an IQueryable based on the passed-in Expression Chinook Database + Adds the parameter. + Name of the parameter. + The parameter value. + Type of the data. + The parameter direction. - + - Adds a T item to the db + Adds the parameter. + Name of the parameter. + The parameter value. + Type of the data. - + - Adds a T item to the db + Adds the parameter. + Name of the parameter. + The parameter value. - - - Adds a bunch of T items + + + Adds the output parameter. + Name of the parameter. + Size of the max. + Type of the db. - - - Adds a bunch of T items + + + Adds the output parameter. + Name of the parameter. + Size of the max. - + - Updates the passed-in T + Adds the output parameter. + Name of the parameter. - + - Updates the passed-in T + Adds the output parameter. + Name of the parameter. + Type of the db. - + - Updates the passed-in T + Adds a return parameter (RETURN_VALUE) to the command. + - + - Updates the passed-in T + Suggested by feroalien@hotmail.com + Issue 11 fix + - + - Deletes the passed-in T items + Gets or sets the command timeout (in seconds). + The command timeout. - + - Deletes the passed-in T items + Gets or sets the type of the command. + The type of the command. - + - Deletes the passed-in T item + Gets or sets the command SQL. + The command SQL. - + - Deletes the passed-in T item + Gets or sets the parameters. + The parameters. - + - Deletes the T item by Primary Key + + - + - Deletes the T item by Primary Key + Initializes a new instance of the class. + The query. - + - Deletes 0 to n T items from the Database based on the passed-in Expression + Builds the paged select statement. + - + - Deletes 0 to n T items from the Database based on the passed-in Expression + Builds the insert statement. + @@ -4468,102 +4368,219 @@ - + - Rewrites an expression tree so that locally isolatable sub-expressions are evaluated and converted into ConstantExpression nodes. + Removes one or more SelectExpression's by rewriting the expression tree to not include them, promoting + their from clause expressions and rewriting any column expressions that may have referenced them to now + reference the underlying data directly. - + - Performs evaluation and replacement of independent sub-trees + Summary for the Inflector class - The root of the expression tree. - A function that decides whether a given expression node can be part of the local function. - A new tree with sub-trees evaluated and replaced. - + - Performs evaluation and replacement of independent sub-trees + Initializes the class. - The root of the expression tree. - A new tree with sub-trees evaluated and replaced. - + - Evaluates and replaces sub-trees when first candidate is reached (top-down) + Adds the irregular rule. + The singular. + The plural. - + - Performs bottom-up analysis to determine which nodes can possibly - be part of an evaluated sub-tree. + Adds the unknown count rule. + The word. - + - Formats a query expression into TSQL language syntax + Adds the plural rule. + The rule. + The replacement. - + - TSQL specific QueryLanguage + Adds the singular rule. + The rule. + The replacement. - + - + Makes the plural. + The word. + - + - Initializes a new instance of the class. + Makes the singular. - The query. + The word. + - + - Gets the type of the native. + Applies the rules. - Type of the db. + The rules. + The word. - + - Generates SQL for all the columns in table + Converts the string to title case. - Table containing the columns. - - SQL fragment representing the supplied columns. - + The word. + - + - Generates from list. + Converts the string to human case. + The lowercase and underscored word. - + - Sets the column attributes. + Convert string to proper case - The column. + The source string. - + - Builds the paged select statement. + Converts the string to pascal case. + The lowercase and underscored word. - + - Finds the first sub-expression that accesses a Query<T> object + Converts text to pascal case... + + The text. + if set to true [remove underscores]. + + + + + Converts the string to camel case. + The lowercase and underscored word. + - + - Removes column declarations in SelectExpression's that are not referenced + Adds the underscores. + + The pascal cased word. + + + + + Makes the initial caps. + + The word. + + + + + Makes the initial lower case. + + The word. + + + + + Adds the ordinal suffix. + + The number. + + + + + Converts the underscores to dashes. + + The underscored word. + + + + + Summary for the InflectorRule class + + + + + + + + + + + + + + + Initializes a new instance of the class. + + The regex pattern. + The replacement text. + + + + Applies the specified word. + + The word. + + + + + Summary for the Files class + + + + + Read a text file and obtain it's contents. + + The complete file path to write to. + String containing the content of the file. + + + + Creates or opens a file for writing and writes text to it. + + The complete file path to write to. + A String containing text to be written to the file. + + + + Update text within a file by replacing a substring within the file. + + The complete file path to write to. + A String to be replaced. + A String to replace all occurrences of lookFor. + + + + Writes out a string to a file. + + The complete file path to write to. + A String containing text to be written to the file. + + + + Fetches a web page + The URL. + diff --git a/NzbDrone.Core/Libraries/SubSonic.Core.dll b/NzbDrone.Core/Libraries/SubSonic.Core.dll index 065bba65d..528c2adfe 100644 Binary files a/NzbDrone.Core/Libraries/SubSonic.Core.dll and b/NzbDrone.Core/Libraries/SubSonic.Core.dll differ diff --git a/NzbDrone.Core/Libraries/System.Data.SQLite.Linq.dll b/NzbDrone.Core/Libraries/System.Data.SQLite.Linq.dll deleted file mode 100644 index 48653d1da..000000000 Binary files a/NzbDrone.Core/Libraries/System.Data.SQLite.Linq.dll and /dev/null differ diff --git a/NzbDrone.Core/NzbDrone.Core.csproj b/NzbDrone.Core/NzbDrone.Core.csproj index 4c65666cc..87cb933e7 100644 --- a/NzbDrone.Core/NzbDrone.Core.csproj +++ b/NzbDrone.Core/NzbDrone.Core.csproj @@ -121,10 +121,17 @@ + + False + Libraries\Castle.Core.dll + - + + False + Libraries\SubSonic.Core.dll + @@ -146,13 +153,14 @@ + - + - + @@ -186,6 +194,7 @@ + @@ -195,13 +204,9 @@ - - - - diff --git a/NzbDrone.Core/Providers/EpisodeProvider.cs b/NzbDrone.Core/Providers/EpisodeProvider.cs index 1f292e219..0566f8201 100644 --- a/NzbDrone.Core/Providers/EpisodeProvider.cs +++ b/NzbDrone.Core/Providers/EpisodeProvider.cs @@ -2,6 +2,7 @@ using System; using System.Collections.Generic; using System.Text.RegularExpressions; using NzbDrone.Core.Repository; +using NzbDrone.Core.Repository.Quality; using SubSonic.Repository; namespace NzbDrone.Core.Providers @@ -100,10 +101,10 @@ namespace NzbDrone.Core.Providers foreach (var ep in result) { //TODO: Get TVDB episode Title, Series name and the rest of the details - ep.Season = Convert.ToInt32(match.Groups["seasonNumber"].Value); + ep.SeasonNumber = Convert.ToInt32(match.Groups["seasonNumber"].Value); ep.Title = ReplaceSeparatorChars(match.Groups["episodeName"].Value); ep.Proper = title.Contains("PROPER"); - ep.Quality = Quality.Unknown; + ep.Quality = QualityTypes.Unknown; } return result; diff --git a/NzbDrone.Core/Providers/SeriesProvider.cs b/NzbDrone.Core/Providers/SeriesProvider.cs index 00afce4e3..82c0cd81d 100644 --- a/NzbDrone.Core/Providers/SeriesProvider.cs +++ b/NzbDrone.Core/Providers/SeriesProvider.cs @@ -52,7 +52,7 @@ namespace NzbDrone.Core.Providers public Series GetSeries(long tvdbId) { - return _sonioRepo.Single(s => s.TvdbId == tvdbId.ToString()); + return _sonioRepo.Single(s => s.TvdbId == tvdbId); } public IList GetSeasons(long tvdbId) @@ -60,7 +60,7 @@ namespace NzbDrone.Core.Providers return _sonioRepo.Find(c => c.SeriesId == tvdbId); } - + public void SyncSeriesWithDisk() { foreach (string seriesFolder in _diskProvider.GetDirectories(_config.SeriesRoot)) @@ -79,14 +79,14 @@ namespace NzbDrone.Core.Providers private void AddShow(string path) { var searchResults = _tvDb.SearchSeries(new DirectoryInfo(path).Name); - if (searchResults.Count != 0 && !_sonioRepo.Exists(s => s.TvdbId == searchResults[0].Id.ToString())) + if (searchResults.Count != 0 && !_sonioRepo.Exists(s => s.TvdbId == searchResults[0].Id)) AddShow(path, _tvDb.GetSeries(searchResults[0].Id, searchResults[0].Language)); } private void AddShow(string path, TvdbSeries series) { var repoSeries = new Series(); - repoSeries.TvdbId = series.Id.ToString(); + repoSeries.TvdbId = series.Id; repoSeries.SeriesName = series.SeriesName; repoSeries.AirTimes = series.AirsTime; repoSeries.AirsDayOfWeek = series.AirsDayOfWeek; diff --git a/NzbDrone.Core/Repository/Episode.cs b/NzbDrone.Core/Repository/Episode.cs index 2ba2bad4e..199ea973b 100644 --- a/NzbDrone.Core/Repository/Episode.cs +++ b/NzbDrone.Core/Repository/Episode.cs @@ -1,19 +1,27 @@ using System; -using System.ServiceModel.Syndication; +using NzbDrone.Core.Repository.Quality; using SubSonic.SqlGeneration.Schema; namespace NzbDrone.Core.Repository { public class Episode { - [SubSonicPrimaryKey] - public string EpisodeId { get; set; } + [SubSonicPrimaryKey(false)] + public long EpisodeId { get; set; } + public long SeriesId { get; set; } public string Title { get; set; } - public long Season { get; set; } + public long SeasonId { get; set; } + public int SeasonNumber { get; set; } public int EpisodeNumber { get; set; } public DateTime AirDate { get; set; } - public Quality Quality { get; set; } + public QualityTypes Quality { get; set; } public bool Proper { get; set; } + + [SubSonicToOneRelation(ThisClassContainsJoinKey = true)] + public virtual Season Season { get; private set; } + + [SubSonicToOneRelation(ThisClassContainsJoinKey = true)] + public virtual Series Series { get; private set; } } } \ No newline at end of file diff --git a/NzbDrone.Core/Repository/Quality/AllowedQuality.cs b/NzbDrone.Core/Repository/Quality/AllowedQuality.cs new file mode 100644 index 000000000..3ff1663f2 --- /dev/null +++ b/NzbDrone.Core/Repository/Quality/AllowedQuality.cs @@ -0,0 +1,9 @@ +namespace NzbDrone.Core.Repository.Quality +{ + public class AllowedQuality + { + public int Id { get; set; } + public int ProfileId { get; set; } + public QualityTypes Quality { get; set; } + } +} diff --git a/NzbDrone.Core/Repository/QualityProfile.cs b/NzbDrone.Core/Repository/Quality/QualityProfile.cs similarity index 72% rename from NzbDrone.Core/Repository/QualityProfile.cs rename to NzbDrone.Core/Repository/Quality/QualityProfile.cs index 42fbaf077..20e666170 100644 --- a/NzbDrone.Core/Repository/QualityProfile.cs +++ b/NzbDrone.Core/Repository/Quality/QualityProfile.cs @@ -1,16 +1,14 @@ using System; using System.Collections.Generic; using System.ComponentModel; -using System.Linq; -using System.Text; using SubSonic.SqlGeneration.Schema; -namespace NzbDrone.Core.Repository +namespace NzbDrone.Core.Repository.Quality { public class QualityProfile { public int Id { get; set; } - public Quality Cutoff { get; set; } + public QualityTypes Cutoff { get; set; } [EditorBrowsable(EditorBrowsableState.Never)] public string SonicAllowed @@ -27,15 +25,15 @@ namespace NzbDrone.Core.Repository private set { var qualities = value.Split('|'); - Allowed = new List(qualities.Length); + Allowed = new List(qualities.Length); foreach (var quality in qualities) { - Allowed.Add((Quality)Convert.ToInt32(quality)); + Allowed.Add((QualityTypes)Convert.ToInt32(quality)); } } } [SubSonicIgnore] - public List Allowed { get; set; } + public List Allowed { get; set; } } } diff --git a/NzbDrone.Core/Repository/Quality.cs b/NzbDrone.Core/Repository/Quality/QualityTypes.cs similarity index 90% rename from NzbDrone.Core/Repository/Quality.cs rename to NzbDrone.Core/Repository/Quality/QualityTypes.cs index 2bb406b39..a328b671a 100644 --- a/NzbDrone.Core/Repository/Quality.cs +++ b/NzbDrone.Core/Repository/Quality/QualityTypes.cs @@ -1,10 +1,10 @@ -namespace NzbDrone.Core.Repository +namespace NzbDrone.Core.Repository.Quality { // ReSharper disable InconsistentNaming /// /// Represents Video Quality /// - public enum Quality + public enum QualityTypes { /// /// Quality is unknown diff --git a/NzbDrone.Core/Repository/Season.cs b/NzbDrone.Core/Repository/Season.cs index d324d7fd1..2b795d2f5 100644 --- a/NzbDrone.Core/Repository/Season.cs +++ b/NzbDrone.Core/Repository/Season.cs @@ -1,4 +1,5 @@ using System; +using System.Collections.Generic; using System.ServiceModel.Syndication; using SubSonic.SqlGeneration.Schema; @@ -6,11 +7,17 @@ namespace NzbDrone.Core.Repository { public class Season { - [SubSonicPrimaryKey] - public string SeasonId { get; set; } + [SubSonicPrimaryKey(false)] + public long SeasonId { get; set; } public long SeriesId { get; set; } public int SeasonNumber { get; set; } public bool Monitored { get; set; } public string Folder { get; set; } + + [SubSonicToManyRelation] + public virtual List Episodes { get; set; } + + [SubSonicToOneRelation(ThisClassContainsJoinKey = true)] + public virtual Series Series { get; set; } } } \ No newline at end of file diff --git a/NzbDrone.Core/Repository/Series.cs b/NzbDrone.Core/Repository/Series.cs index 7a28b8c0c..c8f377d6a 100644 --- a/NzbDrone.Core/Repository/Series.cs +++ b/NzbDrone.Core/Repository/Series.cs @@ -1,12 +1,13 @@ using System; +using System.Collections.Generic; using SubSonic.SqlGeneration.Schema; namespace NzbDrone.Core.Repository { public class Series { - [SubSonicPrimaryKey] - public string TvdbId { get; set; } + [SubSonicPrimaryKey(false)] + public int TvdbId { get; set; } public string SeriesName { get; set; } @@ -22,5 +23,11 @@ namespace NzbDrone.Core.Repository public string Language { get; set; } public string Path { get; set; } + + [SubSonicToManyRelation] + public virtual List Seasons { get; private set; } + + [SubSonicToManyRelation] + public virtual List Episodes { get; private set; } } } \ No newline at end of file