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,9 +4,870 @@ SubSonic.Core - + - Removes column declarations in SelectExpression's that are not referenced + + + + + + + + + + + + + + + + Type related helper methods + + + + + + + + + + Initializes a new instance of the class. + + From. + To. + Type of the join. + + + + Gets the join type value. + + The j. + + + + + + Gets or sets the type. + + The type. + + + + Gets or sets from column. + + From column. + + + + Gets or sets to column. + + To column. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Returns Schema instance with empty lists. + + + + + Defines the language rules for the query provider + + + + + Defines the language rules for the query provider + + + + + Determines whether the CLR type corresponds to a scalar data type in the query language + + + + + + + Determines whether the given expression can be represented as a column in a select expressionss + + + + + + + Provides language specific query translation. Use this to apply language specific rewrites or + to make assertions/validations about the query. + + + + + + + Converts the query expression into text of this query language + + + + + + + Determine which sub-expressions must be parameters + + + + + + + An enumeration value for no options configured. + + + + + The default set of options (right now the same as none). + + + + + Use this flag to let the repository run migrations. + + + + + + + + + + + + + + + Initializes a new instance of the class. + + The provider. + + + + Validates the query. + + + + + Finds the column. + + Name of the column. + + + + + Wheres the specified column name. + + Name of the column. + + + + + Wheres the specified column. + + The column. + + + + + Wheres the specified agg. + + The agg. + + + + + Ors the specified column name. + + Name of the column. + + + + + Ors the specified column. + + The column. + + + + + Ors the specified agg. + + The agg. + + + + + Ors the expression. + + Name of the column. + + + + + Opens the expression. + + + + + + Closes the expression. + + + + + + Ands the specified column name. + + Name of the column. + + + + + Ands the specified column. + + The column. + + + + + Ands the specified agg. + + The agg. + + + + + Ands the expression. + + 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. + + + + + Lefts the inner join. + + From column. + To column. + + + + + Rights the inner join. + + From column. + To column. + + + + + Lefts the outer join. + + From column. + To column. + + + + + Rights the outer join. + + From column. + To column. + + + + + Nots the equal join. + + From column. + To column. + + + + + Orders the asc. + + The columns. + + + + + Orders the desc. + + The columns. + + + + + Pageds the specified current page. + + The current page. + Size of the page. + + + + + Pageds the specified current page. + + The current page. + Size of the page. + The id column. + + + + + Executes this instance. + + + + + + Executes the reader. + + + + + + Executes the scalar. + + + + + + Executes the scalar. + + The type of the result. + + + + + Gets the record count. + + + + + + Executes the typed list. + + + + + + + Executes the typed list. + + + + + + + Executes the query and returns the result as a single item of T + + The type of item to return + + + + Executes the transaction. + + The queries. + + + + Executes the transaction. + + The queries. + Name of the connection string. + + + + Gets or sets the open paren count. + + The open paren count. + + + + Gets or sets the closed paren count. + + The closed paren count. + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + The table. + The provider. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Enum for General SQL Functions + + + + + + + + + + Counts the specified col. + + The col. + + + + + Counts the specified col. + + The col. + The alias. + + + + + Counts the specified column name. + + Name of the column. + + + + + Counts the specified column name. + + Name of the column. + The alias. + + + + + Sums the specified col. + + The col. + + + + + Sums the specified column name. + + Name of the column. + + + + + Sums the specified col. + + The col. + The alias. + + + + + Sums the specified column name. + + Name of the column. + The alias. + + + + + Groups the by. + + The col. + + + + + Groups the by. + + Name of the column. + + + + + Groups the by. + + The col. + The alias. + + + + + Groups the by. + + Name of the column. + The alias. + + + + + Avgs the specified col. + + The col. + + + + + Avgs the specified column name. + + Name of the column. + + + + + 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. + + + + + Maxes the specified column name. + + Name of the column. + + + + + Maxes the specified col. + + The col. + The alias. + + + + + Maxes the specified column name. + + Name of the column. + The alias. + + + + + Mins the specified col. + + The col. + + + + + Mins the specified column name. + + Name of the column. + + + + + Mins the specified col. + + The col. + The alias. + + + + + Mins the specified column name. + + Name of the column. + The alias. + + + + + Variances the specified col. + + The col. + + + + + Variances the specified column name. + + Name of the column. + + + + + Variances the specified col. + + The col. + The alias. + + + + + Variances the specified column name. + + Name of the column. + The alias. + + + + + Standards the deviation. + + The col. + + + + + Standards the deviation. + + Name of the column. + + + + + Standards the deviation. + + The col. + The alias. + + + + + Standards the deviation. + + Name of the column. + The alias. + + + + + Initializes a new instance of the class. + + Name of the column. + Type of the aggregate. + + + + Initializes a new instance of the class. + + Name of the column. + The alias. + Type of the aggregate. + + + + Initializes a new instance of the class. + + The column. + Type of the aggregate. + + + + Initializes a new instance of the class. + + The column. + The alias. + Type of the aggregate. + + + + Gets the type of the function. + + The agg. + + + + + Gets the SQL function call without an alias. Example: AVG(UnitPrice). + + + + + + Overrides ToString() to return the SQL Function call + + + + + + Gets or sets the type of the aggregate. + + The type of the aggregate. + + + + Gets or sets the name of the column. + + The name of the column. + + + + Gets or sets the alias. + + The alias. + + + + returns the set of all aliases produced by a query source @@ -14,9 +875,26 @@ An extended expression visitor including custom DbExpression nodes - + - returns the list of SelectExpressions accessible from the source expression + Moves order-bys to the outermost select if possible + + + + + Add a sequence of order expressions to an accumulated list, prepending so as + to give precedence to the new expressions over any previous expressions + + + + + + Rebind order expressions to reference a new alias and add to column declarations if necessary + + + + + returns the set of all aliases produced by a query source @@ -24,6 +902,1715 @@ Determines if a SelectExpression contains any aggregate expressions + + + Summary for the Dates class + + + + + Returns a date in the past by days. + + The days. + + + + + Returns a date in the future by days. + + The days. + + + + + Returns a date in the past by hours. + + The hours. + + + + + Returns a date in the future by hours. + + The hours. + + + + + Returns a date in the past by minutes + + The minutes. + + + + + Returns a date in the future by minutes. + + The minutes. + + + + + Gets a date in the past according to seconds + + The seconds. + + + + + Gets a date in the future by seconds. + + The seconds. + + + + + Diffs the specified date. + + The date one. + The date two. + + + + + Returns a double indicating the number of days between two dates (past is negative) + + The date one. + The date two. + + + + + Returns a double indicating the number of days between two dates (past is negative) + + The date one. + The date two. + + + + + Returns a double indicating the number of days between two dates (past is negative) + + The date one. + The date two. + + + + + Returns a double indicating the number of days between two dates (past is negative) + + The date one. + The date two. + + + + + Returns a double indicating the number of days between two dates (past is negative) + + The date one. + The date two. + + + + + Returns a double indicating the number of days between two dates (past is negative) + + 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" + + The start time. + The end time. + + + + + Counts the number of weekdays between two dates. + + The start time. + The end time. + + + + + Counts the number of weekends between two dates. + + The start time. + The end time. + + + + + Verifies if the object is a date + + The dt. + + true if the specified dt is date; otherwise, false. + + + + + Checks to see if the date is a week day (Mon - Fri) + + The dt. + + true if [is week day] [the specified dt]; otherwise, false. + + + + + Checks to see if the date is Saturday or Sunday + + 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" + + The start time. + The end time. + + + + + Given a datetime object, returns the formatted month and day, i.e. "April 15th" + + The date to extract the string from + + + + + Given a datetime object, returns the formatted day, "15th" + + The date to extract the string from + + + + + Remove leading strings with zeros and adjust for singular/plural + + The STR. + The previous STR. + The t. + + + + + + + + + + + + + + + + Generates the command line. + + + + + + Generates the constraints. + + + + + + Generates from list. + + + + + + Generates the order by. + + + + + + Generates the group by. + + + + + + Generates the joins. + + + + + + Gets the paging SQL wrapper. + + + + + + Gets the select columns. + + + + + + Finds the column. + + Name of the column. + + + + + Builds the select statement. + + + + + + Builds the paged select statement. + + + + + + Builds the update statement. + + + + + + Builds the insert statement. + + + + + + Builds the delete statement. + + + + + + Sets the insert query. + + The q. + + + + SqlFragment. Field values may change depending on the inheriting Generator. + + + + + Initializes a new instance of the class. + + + + + Sets the insert query. + + The q. + + + + Finds the column. + + Name of the column. + + + + + Generates the group by. + + + + + + Generates the command line. + + + + + + Generates the joins. + + + + + + Generates from list. + + + + + + Generates the constraints. + + + + + + Generates the order by. + + + + + + Gets the select columns. + + + + + + Gets the paging SQL wrapper. + + + + + + Builds the paged select statement. + + + + + + Builds the select statement. + + + + + + Builds the update statement. + + + + + + Builds the insert statement. + + + + + + Builds the delete statement. + + + + + + Qualifies the name of the table. + + The TBL. + + + + + Gets the qualified select. + + The table. + + + + + Generates the select column list. + + + + + + Builds the aggregate commands. + + + + + + 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... + + + + + Initializes a new instance of the class. + + The query. + + + + Builds the paged select statement. + + + + + + Builds the insert statement. + + + + + + Summary for the SqlFragment class + + + + + + + + + + Initializes a new instance of the class. + + The provider. + The columns. + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + The aggregates. + + + + Initializes a new instance of the class. + + The provider. + The aggregates. + + + + Initializes a new instance of the class. + + The columns. + + + + Initializes a new instance of the class. + WARNING: This overload should only be used with applications that use a single provider! + + The columns. + + + + Alls the columns from. + + + + + + + Expressions the specified SQL expression. + + The SQL expression. + + + + + Tops the specified top. + + The top. + + + + + Result from calling ColumnProjector.ProjectColumns + + + + + 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 + + + + + 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 LINQ IQueryable query provider that executes database queries over a DbConnection + + + + + A basic abstract LINQ query provider + + + + + Optional interface for IQueryProvider to implement Query<T>'s QueryText property. + + + + + DbQueryProvider constrcutor that allows for external control of policy + to allow for new types of databases. + + + + + Converts the query expression into text that corresponds to the command that would be executed. + Useful for debugging. + + + + + + + Execute the query expression (does translation, etc.) + + + + + + + Convert the query expression into an execution plan + + + + + + + Do all query translations execpt building the execution plan + + + + + + + Determines whether a given expression can be executed locally. + (It contains no parts that should be translated to the target environment.) + + + + + + + Execute an actual query specified in the target language using the sADO connection + + + + + + + + + Get an IEnumerable that will execute the specified query when enumerated + + + + + + + + + Get an ADO command object initialized with the command-text and parameters + + + + + + + + + Write a command to the log + + + + + + Parses the object value. + + The expression. + + + + + Parses the passed-in Expression into exclusive (WHERE x=y) constraints. + + The exp. + + + + + Parses the passed-in Expression into exclusive (WHERE x=y) constraint. + + The expression. + + + + + Determines whether the specified exp is constraint. + + The exp. + + true if the specified exp is constraint; otherwise, false. + + + + + Gets the constant value. + + The exp. + + + + + + + + + Simple implementation of the IGrouping<TKey, TElement> interface + + + + + + + Rewrite all column references to one or more aliases to a new single alias + + + + + MySQL specific QueryLanguage + + + + + + A schema generator for your DB + + + + + Builds a CREATE TABLE statement. + + + + + + + Builds a DROP TABLE statement. + + Name of the table. + + + + + Adds the column. + + Name of the table. + The column. + + + + Alters the column. + + The column. + + + + Removes the column. + + Name of the table. + Name of the column. + + + + + Gets the type of the native. + + Type of the db. + + + + + Generates the columns. + + Table containing the columns. + + SQL fragment representing the supplied columns. + + + + + Sets the column attributes. + + The column. + + + + + Builds a CREATE TABLE statement. + + + + + + + Builds a DROP TABLE statement. + + Name of the table. + + + + + Adds the column. + + Name of the table. + The column. + + + + + Alters the column. + + The column. + + + + Removes the column. + + Name of the table. + Name of the column. + + + + + Gets the type of the native. + + Type of the db. + + + + + Generates the columns. + + Table containing the columns. + + SQL fragment representing the supplied columns. + + + + + Sets the column attributes. + + The column. + + + + + Gets an ITable from the DB based on name + + + + + Creates a list of table names + + + + + Removes the column. + + + + + + + + Sets the column attributes. + + The column. + + + + + Gets the type of the db. + + Type of the SQL. + + + + + A Repository class which wraps the a Database by type + + + + + Loads a T object + + + The item. + The column. + The value. + + + + + Loads a T object + + + The item. + The expression. + + + + + Returns all T items + + + + + Returns a single record + + + + + Returns a server-side Paged List + + + + + Returns a server-side Paged List + + + + + Returns a server-side Paged List + + + + + Returns an IQueryable based on the passed-in Expression Chinook Database + + + + + Returns an IQueryable based on the passed-in Expression Chinook Database + + + + + Adds a T item to the db + + + + + Adds a T item to the db + + + + + Adds a bunch of T items + + + + + Adds a bunch of T items + + + + + Updates the passed-in T + + + + + Updates the passed-in T + + + + + Updates the passed-in T + + + + + Updates the passed-in T + + + + + Deletes the passed-in T items + + + + + Deletes the passed-in T items + + + + + Deletes the passed-in T item + + + + + Deletes the passed-in T item + + + + + Deletes the T item by Primary Key + + + + + Deletes the T item by Primary Key + + + + + Deletes 0 to n T items from the Database based on the passed-in Expression + + + + + Deletes 0 to n T items from the Database based on the passed-in Expression + + + + + Finds the first sub-expression that accesses a Query<T> object + + + + + Writes out an expression tree in a C#-ish syntax + + + + + SQLite specific QueryLanguage + + + + + 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. + + + + + 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. + + + + + Indicates to the default DataProvider that it should use a per-thread shared connection. + + + + + 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. + + + + Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. + + + + + Releases unmanaged and - optionally - managed resources + + true to release both managed and unmanaged resources; false to release only unmanaged resources. + + + + Provides access to underlying connection that is shared per thread + + 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. + + + + + Initializes a new instance of the class. + + The provider. + + + + Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. + + + + + Releases unmanaged and - optionally - managed resources + + true to release both managed and unmanaged resources; false to release only unmanaged resources. + + + + Gets the connection. + + + + + + + Gets the connection. + + The connection. + + + + Gets a value indicating whether this instance is using shared connection. + + + true if this instance is using shared connection; otherwise, false. + + + + + Type related helper methods + + + + + Formats a query expression into TSQL language syntax + + + + + Formats a query expression into TSQL language syntax + + + + + Attempts to rewrite cross-apply and outer-apply joins as inner and left-outer joins + + + + + 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 + + The credit card. + + true if valid; otherwise, false. + + + + + Determines whether the specified string is an En Route card + + The credit card. + + true if valid; otherwise, false. + + + + + Determines whether the specified string is an JCB card + + The credit card. + + true if valid; otherwise, false. + + + + + Determines whether the specified string is a Master Card credit card + + The credit card. + + true if valid; otherwise, false. + + + + + 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. + + + + + Determines whether the credit card number, once cleaned, passes the Luhn algorith. + See: http://en.wikipedia.org/wiki/Luhn_algorithm + + The credit card number. + + + + + Determines whether the specified int array passes the Luhn algorith + + 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 + + The string to evaluated for numeric conversion + + true if the string can be converted to a number; otherwise, false. + + + + + Builds the delete query. + + The item. + + + + + Builds the insert query. + + The item. + + + + + Builds the update query. + + The item. + + + + + Duplicate the query expression by making a copy with new table aliases + + + + + Writes out an expression tree (including DbExpression nodes) in a C#-ish syntax + + + + + 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. + + + true if this instance is date time; otherwise, false. + + + + + Gets a value indicating whether this instance is string. + + true if this instance is string; otherwise, false. + + + + + + + + + + Initializes a new instance of the class. + + The query. + + + + Gets the type of the native. + + Type of the db. + + + + + Generates SQL for all the columns in table + + Table containing the columns. + + SQL fragment representing the supplied columns. + + + + + Generates from list. + + + + + + Sets the column attributes. + + The column. + + + + + Builds the paged select statement. + + + + + + Creates a set of SQL commands for synchronizing your database with your object set + + + + + Creates a reusable, parameterized representation of a query that caches the execution plan + + + + + Common interface for controlling defer-loadable types + + + + + A list implementation that is loaded the first the contents are examined + + + + + + Holds list of tables, views, stored procedures, etc. + + + + + Initializes the shared connection. + + + + + + Initializes the shared connection. + + The shared connection string. + + + + + Resets the shared connection. + + + + + Adds the params. + + The CMD. + The qry. + + + + Converts a data reader into a sequence of objects using a projector function on each row + + + The reader. + The fn projector. + + + + + Gets a value indicating whether [current connection string is default]. + + + true if [current connection string is default]; otherwise, false. + + + + + Gets or sets the current shared connection. + + The current shared connection. + + + + Gets the type of the native. + + Type of the db. + + + + + Generates the columns. + + Table containing the columns. + + SQL fragment representing the supplied columns. + + + + + Builds a CREATE TABLE statement. + + + + + + + Sets the column attributes. + + The column. + + + + + Gets the type of the db. + + Type of my SQL. + + + + + + + + + + Equals to. + + 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 . + + + A that represents the current . + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + The table. + + + + Sets the specified column name. + + Name of the column. + + + + + Sets the expression. + + The column. + + + + + Executes this instance. + + + + + + + + + + + Initializes a new instance of the class. + + The provider. + + + + Sets the specified columns. + + The columns. + + + + + Rewrites nested singleton projection into server-side joins + + A simple query mapping that attempts to infer mapping from naming conventionss @@ -160,212 +2747,90 @@ The language related to the mapping - + - Builds an execution plan for a query expression + Returns the SqlDbType for a give DbType - - - - columns referencing the outer alias are turned into special named-value parameters - - - - - - Returns an Object with the specified Type and whose value is equivalent to the specified object. - - 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. - - - - - - - - - - - Equals to. - - The value. - + - Determines whether the specified is equal to the current . + Takes the properties of an object and turns them into SubSonic.Query.Constraint - 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 . - - - A that represents the current . - - - - - Initializes a new instance of the class. - - - - - Initializes a new instance of the class. - - The table. - - - - Sets the specified column name. - - Name of the column. + - + - Sets the expression. + Coerces an IDataReader to try and load an object using name/property matching + + + + + Loads a single primitive value type + + + + + + Toes the type of the enumerable value. + + + The IDataReader to read from. + + + + + Determines whether [is core system type] [the specified type]. + + The type. + + 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 + + + + + Builds a SubSonic UPDATE query from the passed-in object + + + + + Builds a SubSonic INSERT query from the passed-in object + + + + + Builds a SubSonic DELETE query from the passed-in object + + + + + Sets the column attributes. The column. - + - Executes this instance. + Gets the type of the db. + Type of the SQL. - - - - - - - - Initializes a new instance of the class. - - The provider. - - - - Sets the specified columns. - - The columns. - - - - - Summary for the RegexPattern class - - - - - - - - - - Initializes a new instance of the class. - - From. - To. - Type of the join. - - - - Gets the join type value. - - The j. - - - - - Gets or sets the type. - - The type. - - - - Gets or sets from column. - - From column. - - - - Gets or sets to column. - - To column. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -455,924 +2920,16 @@ - - - Removes duplicate column declarations that refer to the same underlying column - - - - - Converts LINQ query operators to into custom DbExpression's - - - - - Initializes the class. - - - - - 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. - - - - - Plurals to singular. - - The source string. - - - - - Singulars to plural. - - The source string. - - - - - Make plural when count is not one - - The number of things - The source string. - - - - - Removes the specified chars from the beginning of a string. - - The source string. - The remove from beginning. - - - - - Removes chars from the beginning of a string, up to the specified string - - The source string. - The remove up to. - - - - - Strips the last char from a a string. - - The source string. - - - - - 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 - - The source string. - - - - - Creates a string array based on the words in a sentence - - The source string. - - - - - Strips all HTML tags from a string - - The HTML string. - - - - - Strips all HTML tags from a string and replaces the tags with the specified replacement - - The HTML string. - The HTML place holder. - - - - - Converts a generic List collection to a single comma-delimitted string. - - The list. - - - - - Converts a generic List collection to a single string using the specified delimitter. - - The list. - The delimiter. - - - - - Strips the specified input. - - The source string. - The strip value. - - - - - Converts ASCII encoding to Unicode - - The ASCII code. - - - - - Converts Text to HTML-encoded string - - The text string. - - - - - Converts HTML-encoded bits to Text - - The entity text. - - - - - 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 - - - - - Strings to enum. - - - The value. - - - - - Fills the entities. - - - - - Converts US State Name to it's two-character abbreviation. Returns null if the state name was not found. - - US State Name (ie Texas) - - - - - Converts a two-character US State Abbreviation to it's official Name Returns null if the abbreviation was not found. - - US State Name (ie Texas) - - - - - Fills the US States. - - - - - - - - - - - - - - - Generates the command line. - - - - - - Generates the constraints. - - - - - - Generates from list. - - - - - - Generates the order by. - - - - - - Generates the group by. - - - - - - Generates the joins. - - - - - - Gets the paging SQL wrapper. - - - - - - Gets the select columns. - - - - - - Finds the column. - - Name of the column. - - - - - Builds the select statement. - - - - - - Builds the paged select statement. - - - - - - Builds the update statement. - - - - - - Builds the insert statement. - - - - - - Builds the delete statement. - - - - - - Sets the insert query. - - The q. - - - - SqlFragment. Field values may change depending on the inheriting Generator. - - - - - Initializes a new instance of the class. - - The q. - - - - Sets the insert query. - - The q. - - - - Finds the column. - - Name of the column. - - - - - Generates the group by. - - - - - - Generates the command line. - - - - - - Generates the joins. - - - - - - Generates from list. - - - - - - Generates the constraints. - - - - - - Generates the order by. - - - - - - Gets the select columns. - - - - - - Gets the paging SQL wrapper. - - - - - - Builds the paged select statement. - - - - - - Builds the select statement. - - - - - - Builds the update statement. - - - - - - Builds the insert statement. - - - - - - Builds the delete statement. - - - - - - Qualifies the name of the table. - - The TBL. - - - - - Gets the qualified select. - - The table. - - - - - Generates the select column list. - - - - - - Builds the aggregate commands. - - - - - - 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... - - - - - Initializes a new instance of the class. - - The query. - - - - Builds the paged select statement. - - - - - - Builds the insert statement. - - - - - - A schema generator for your DB - - - - - Builds a CREATE TABLE statement. - - - - - - - Builds a DROP TABLE statement. - - Name of the table. - - - - - Adds the column. - - Name of the table. - The column. - - - - Alters the column. - - The column. - - - - Removes the column. - - Name of the table. - Name of the column. - - - - - Gets the type of the native. - - Type of the db. - - - - - Generates the columns. - - Table containing the columns. - - SQL fragment representing the supplied columns. - - - - - Sets the column attributes. - - The column. - - - - - Builds a CREATE TABLE statement. - - - - - - - Builds a DROP TABLE statement. - - Name of the table. - - - - - Adds the column. - - Name of the table. - The column. - - - - - Alters the column. - - The column. - - - - Removes the column. - - Name of the table. - Name of the column. - - - - - Gets the type of the native. - - Type of the db. - - - - - Generates the columns. - - Table containing the columns. - - SQL fragment representing the supplied columns. - - - - - Sets the column attributes. - - The column. - - - - - Gets an ITable from the DB based on name - - - - - 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. - - - - - Attempts to rewrite cross-apply and outer-apply joins as inner and left-outer joins - - rewrites nested projections into client-side joins - + Formats a query expression into TSQL language syntax - - - Formats a query expression into TSQL language syntax - - - - - Extended node types for custom expressions - - - - - A custom expression node that represents a table reference in a SQL query - - - - - A custom expression node that represents a reference to a column in a SQL query - - - - - A declaration of a column in a SQL SELECT expression - - - - - An SQL OrderBy order type - - - - - A pairing of an expression and an order type for use in a SQL Order By clause - - - - - A custom expression node used to represent a SQL SELECT expression - - - - - A kind of SQL join - - - - - A custom expression node representing a SQL join clause - - - - - Allows is-null tests against value-types like int and float - - - - - A custom expression representing the construction of one or more result objects from a - SQL select expression - - - - - Holds list of tables, views, stored procedures, etc. - - - - - Initializes the shared connection. - - - - - - Initializes the shared connection. - - The shared connection string. - - - - - Resets the shared connection. - - - - - Adds the params. - - The CMD. - The qry. - - - - Gets a value indicating whether [current connection string is default]. - - - true if [current connection string is default]; otherwise, false. - - - - - Gets or sets the current shared connection. - - The current shared connection. - - - - For Jeff Atwood - http://www.codinghorror.com/blog/archives/000989.html - - - A class which wraps an inline SQL call - - - - - 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. - - - - - - Executes the specified SQL. - - - - - Executes the scalar. - - The type of the result. - - - - - Executes the typed list. - - - - - - - Executes the reader. - - - - - - TSQL specific QueryLanguage - - - - - Defines the language rules for the query provider - - - - - Determines whether the CLR type corresponds to a scalar data type in the query language - - - - - - - Determines whether the given expression can be represented as a column in a select expressionss - - - - - - - Provides language specific query translation. Use this to apply language specific rewrites or - to make assertions/validations about the query. - - - - - - - Converts the query expression into text of this query language - - - - - - - Determine which sub-expressions must be parameters - - - - - - - Rewrites nested singleton projection into server-side joins - - - - - 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. - - - true if this instance is date time; otherwise, false. - - - - - Gets a value indicating whether this instance is string. - - 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. - - - true if this instance is date time; otherwise, false. - - - - - Gets a value indicating whether this instance is string. - - true if this instance is string; otherwise, false. - - - - Summary for the ReservedColumnName class - - - - - Returns Schema instance with empty lists. - - Where, And, Or @@ -1727,36 +3284,639 @@ true if this instance is aggregate; otherwise, false. + + + Translates accesses to relationship members into projections or joins + + + + + Defines query execution and materialization policies. + + + + + 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. + + + + + + + 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. + + + + + + + Converts a query into an execution plan. The plan is an function that executes the query and builds the + resulting objects. + + + + + + + + The mapping related to the policy. + + + + + Determines if two expressions are equivalent. Supports DbExpression nodes. + + + + + Compare two expressions to determine if they are equivalent + + + + + Returns an Object with the specified Type and whose value is equivalent to the specified object. + + 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. + + + + + + Executes the specified SQL. + + + + + Executes the scalar. + + The type of the result. + + + + + Executes the typed list. + + + + + + + Executes the reader. + + + + + + Rewrites an expression tree so that locally isolatable sub-expressions are evaluated and converted into ConstantExpression nodes. + + + + + 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. + + + + Performs evaluation and replacement of independent sub-trees + + 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) + + + + + Performs bottom-up analysis to determine which nodes can possibly + be part of an evaluated sub-tree. + + + + + Removes select expressions that don't add any additional semantic value + + + + + Replaces references to one specific instance of an expression node with another node. + Supports DbExpression nodes + + + + + Converts the string method calls Contains,EndsWith and StartsWith into queries + + The MethodCall we are attempting to map to a query. + an expression tree. + + + + A holder for 1 or more queries to be executed together + + + + + Builds the SQL statement. + + + + + + Executes this instance. + + + + + + Executes the queries in and returns a multiple result set reader. + + + + + + Gets a command containing all the queued queries. + + + + + + Queues the specified query. + + The query. + + + + Queues the specified query. + + + The query. + + + + Queues a query for use in a transaction. + + The qry. + + + + Queues a query for use in a transaction. + + The CMD. + + + + Queues a query for use in a transaction. + + The SQL. + The parameters. + + + + Executes the transaction. + + + + + Rewrites take and skip expressions into uses of TSQL row_number function + + + + + returns the list of SelectExpressions accessible from the source expression + + + + + Builds an execution plan for a query expression + + + + + columns referencing the outer alias are turned into special named-value parameters + + + + + Initializes the class. + + + + + 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. + + + + + Plurals to singular. + + The source string. + + + + + Singulars to plural. + + The source string. + + + + + Make plural when count is not one + + The number of things + The source string. + + + + + Removes the specified chars from the beginning of a string. + + The source string. + The remove from beginning. + + + + + Removes chars from the beginning of a string, up to the specified string + + The source string. + The remove up to. + + + + + Strips the last char from a a string. + + The source string. + + + + + 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 + + The source string. + + + + + Creates a string array based on the words in a sentence + + The source string. + + + + + Strips all HTML tags from a string + + The HTML string. + + + + + Strips all HTML tags from a string and replaces the tags with the specified replacement + + The HTML string. + The HTML place holder. + + + + + Converts a generic List collection to a single comma-delimitted string. + + The list. + + + + + Converts a generic List collection to a single string using the specified delimitter. + + The list. + The delimiter. + + + + + Strips the specified input. + + The source string. + The strip value. + + + + + Converts ASCII encoding to Unicode + + The ASCII code. + + + + + Converts Text to HTML-encoded string + + The text string. + + + + + Converts HTML-encoded bits to Text + + The entity text. + + + + + 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 + + + + + Strings to enum. + + + The value. + + + + + Fills the entities. + + + + + Converts US State Name to it's two-character abbreviation. Returns null if the state name was not found. + + US State Name (ie Texas) + + + + + Converts a two-character US State Abbreviation to it's official Name Returns null if the abbreviation was not found. + + US State Name (ie Texas) + + + + + Fills the US States. + + + + + Summary for the RegexPattern class + + + + + Removes column declarations in SelectExpression's that are not referenced + + + + + A default implementation of IQueryable for use with QueryProvider + + + + + Replaces references to one specific instance of an expression node with another node + + + + + TSQL specific QueryLanguage + + + + + Removes column declarations in SelectExpression's that are not referenced + + + + + Converts LINQ query operators to into custom DbExpression's + + + + + Rewrite aggregate expressions, moving them into same select expression that has the group-by clause + + Removes joins expressions that are identical to joins that already exist - + - Moves order-bys to the outermost select if possible + Removes duplicate column declarations that refer to the same underlying column - + - Add a sequence of order expressions to an accumulated list, prepending so as - to give precedence to the new expressions over any previous expressions - - - - - - Rebind order expressions to reference a new alias and add to column declarations if necessary + Extended node types for custom expressions - + - Writes out an expression tree (including DbExpression nodes) in a C#-ish syntax + A custom expression node that represents a table reference in a SQL query - + - Writes out an expression tree in a C#-ish syntax + A custom expression node that represents a reference to a column in a SQL query + + + + + A declaration of a column in a SQL SELECT expression + + + + + An SQL OrderBy order type + + + + + A pairing of an expression and an order type for use in a SQL Order By clause + + + + + A custom expression node used to represent a SQL SELECT expression + + + + + A kind of SQL join + + + + + A custom expression node representing a SQL join clause + + + + + Allows is-null tests against value-types like int and float + + + + + A custom expression representing the construction of one or more result objects from a + SQL select expression + + + + + For Jeff Atwood + http://www.codinghorror.com/blog/archives/000989.html + + + A class which wraps an inline SQL call + + + + + 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. + + + + + + Executes the specified SQL. + + + + + Executes the scalar. + + The type of the result. + + + + + Executes the typed list. + + + + + + + Executes the reader. + + + + + + Adds relationship to query results depending on policy + + + + + Converts user arguments into named-value parameters @@ -1839,6 +3999,39 @@ + + + Process the passed-in LINQ expression + + + + + + 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. + + + true if this instance is date time; otherwise, false. + + + + + Gets a value indicating whether this instance is string. + + true if this instance is string; otherwise, false. + + + + Summary for the ReservedColumnName class + + This set of classes abstracts out commands and their parameters so that @@ -2050,1996 +4243,136 @@ The parameters. - - - Common interface for controlling defer-loadable types - - - - - A list implementation that is loaded the first the contents are examined - - - - - - Rewrites take and skip expressions into uses of TSQL row_number function - - - - - Adds relationship to query results depending on policy - - - - - Converts user arguments into named-value parameters - - - - - Result from calling ColumnProjector.ProjectColumns - - - - - 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 - - - - - 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 - - - - - 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. - - - - - A holder for 1 or more queries to be executed together - - - - - Builds the SQL statement. - - - - - - Executes this instance. - - - - - - Executes the queries in and returns a multiple result set reader. - - - - - - Gets a command containing all the queued queries. - - - - - - Queues the specified query. - - The query. - - - - Queues the specified query. - - - The query. - - - - Queues a query for use in a transaction. - - The qry. - - - - Queues a query for use in a transaction. - - The CMD. - - - - Queues a query for use in a transaction. - - The SQL. - The parameters. - - - - Executes the transaction. - - - - - Enum for General SQL Functions - - - + - - - - Counts the specified col. - - The col. - - - - - Counts the specified col. - - The col. - The alias. - - - - - Counts the specified column name. - - Name of the column. - - - - - Counts the specified column name. - - Name of the column. - The alias. - - - - - Sums the specified col. - - The col. - - - - - Sums the specified column name. - - Name of the column. - - - - - Sums the specified col. - - The col. - The alias. - - - - - Sums the specified column name. - - Name of the column. - The alias. - - - - - Groups the by. - - The col. - - - - - Groups the by. - - Name of the column. - - - - - Groups the by. - - The col. - The alias. - - - - - Groups the by. - - Name of the column. - The alias. - - - - - Avgs the specified col. - - The col. - - - - - Avgs the specified column name. - - Name of the column. - - - - - 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. - - - - - Maxes the specified column name. - - Name of the column. - - - - - Maxes the specified col. - - The col. - The alias. - - - - - Maxes the specified column name. - - Name of the column. - The alias. - - - - - Mins the specified col. - - The col. - - - - - Mins the specified column name. - - Name of the column. - - - - - Mins the specified col. - - The col. - The alias. - - - - - Mins the specified column name. - - Name of the column. - The alias. - - - - - Variances the specified col. - - The col. - - - - - Variances the specified column name. - - Name of the column. - - - - - Variances the specified col. - - The col. - The alias. - - - - - Variances the specified column name. - - Name of the column. - The alias. - - - - - Standards the deviation. - - The col. - - - - - Standards the deviation. - - Name of the column. - - - - - Standards the deviation. - - The col. - The alias. - - - - - Standards the deviation. - - Name of the column. - The alias. - - - - - Initializes a new instance of the class. - - Name of the column. - Type of the aggregate. - - - - Initializes a new instance of the class. - - Name of the column. - The alias. - Type of the aggregate. - - - - Initializes a new instance of the class. - - The column. - Type of the aggregate. - - - - Initializes a new instance of the class. - - The column. - The alias. - Type of the aggregate. - - - - Gets the type of the function. - - The agg. - - - - - Gets the SQL function call without an alias. Example: AVG(UnitPrice). - - - - - - Overrides ToString() to return the SQL Function call - - - - - - Gets or sets the type of the aggregate. - - The type of the aggregate. - - - - Gets or sets the name of the column. - - The name of the column. - - - - Gets or sets the alias. - - The alias. - - - - returns the set of all aliases produced by a query source - - - - - Translates accesses to relationship members into projections or joins - - - - - Defines query execution and materialization policies. - - - - - 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. - - - - - - - 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. - - - - - - - Converts a query into an execution plan. The plan is an function that executes the query and builds the - resulting objects. - - - - - - - - The mapping related to the policy. - - - - - Determines if two expressions are equivalent. Supports DbExpression nodes. - - - - - Compare two expressions to determine if they are equivalent - - - - - Returns the SqlDbType for a give DbType - - - - - - Takes the properties of an object and turns them into SubSonic.Query.Constraint - - - - - - - Coerces an IDataReader to try and load an object using name/property matching - - - - - Loads a single primitive value type - - - - - - Toes the type of the enumerable value. - - - The IDataReader to read from. - - - - - Determines whether [is core system type] [the specified type]. - - The type. - - true if [is core system type] [the specified type]; otherwise, false. - - - - - Coerces an IDataReader to load an enumerable of T - - - - - - - Creates a typed list from an IDataReader - - - - - Builds a SubSonic UPDATE query from the passed-in object - - - - - Builds a SubSonic INSERT query from the passed-in object - - - - - Builds a SubSonic DELETE query from the passed-in object - - - - - Gets the type of the native. - - Type of the db. - - - - - Generates the columns. - - Table containing the columns. - - SQL fragment representing the supplied columns. - - - - - Builds a CREATE TABLE statement. - - - - - - - Sets the column attributes. - - The column. - - - - - Gets the type of the db. - - Type of my SQL. - - - - - Simple implementation of the IGrouping<TKey, TElement> interface - - - - - - - Rewrite aggregate expressions, moving them into same select expression that has the group-by clause - - - - - Replaces references to one specific instance of an expression node with another node. - Supports DbExpression nodes - - - - - Parses the object value. - - The expression. - - - - - Parses the passed-in Expression into exclusive (WHERE x=y) constraints. - - The exp. - - - - - Parses the passed-in Expression into exclusive (WHERE x=y) constraint. - - The expression. - - - - - Determines whether the specified exp is constraint. - - The exp. - - true if the specified exp is constraint; otherwise, false. - - - - - Gets the constant value. - - 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. - - - - - 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. - - - - - Indicates to the default DataProvider that it should use a per-thread shared connection. - - - - - 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. - - - - Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. - - - - - Releases unmanaged and - optionally - managed resources - - true to release both managed and unmanaged resources; false to release only unmanaged resources. - - - - Provides access to underlying connection that is shared per thread - - 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. - - - - - Initializes a new instance of the class. - - The provider. - - - - Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. - - - - - Releases unmanaged and - optionally - managed resources - - true to release both managed and unmanaged resources; false to release only unmanaged resources. - - - - Gets the connection. - - - - - - - Gets the connection. - - The connection. - - - - Gets a value indicating whether this instance is using shared connection. - - - true if this instance is using shared connection; otherwise, false. - - - - - A basic abstract LINQ query provider - - - - - Optional interface for IQueryProvider to implement Query<T>'s QueryText property. - - - - - A LINQ IQueryable query provider that executes database queries over a DbConnection - - - - - DbQueryProvider constrcutor that allows for external control of policy - to allow for new types of databases. - - - - - Converts the query expression into text that corresponds to the command that would be executed. - Useful for debugging. - - - - - - - Execute the query expression (does translation, etc.) - - - - - - - Convert the query expression into an execution plan - - - - - - - Do all query translations execpt building the execution plan - - - - - - - Determines whether a given expression can be executed locally. - (It contains no parts that should be translated to the target environment.) - - - - - - - Execute an actual query specified in the target language using the sADO connection - - - - - - - - - Converts a data reader into a sequence of objects using a projector function on each row - - - The reader. - The fn projector. - - - - - Get an IEnumerable that will execute the specified query when enumerated - - - - - - - - - Get an ADO command object initialized with the command-text and parameters - - - - - - - - - Write a command to the log - - - - - - Summary for the SqlFragment class - - - - - - + - Initializes a new instance of the class. - - The provider. - - - - Validates the query. - - - - - Finds the column. - - Name of the column. - - - - - Wheres the specified column name. - - Name of the column. - - - - - Wheres the specified column. - - The column. - - - - - Wheres the specified agg. - - The agg. - - - - - Ors the specified column name. - - Name of the column. - - - - - Ors the specified column. - - The column. - - - - - Ors the specified agg. - - The agg. - - - - - Ors the expression. - - Name of the column. - - - - - Opens the expression. - - - - - - Closes the expression. - - - - - - Ands the specified column name. - - Name of the column. - - - - - Ands the specified column. - - The column. - - - - - Ands the specified agg. - - The agg. - - - - - Ands the expression. - - 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. - - - - - Lefts the inner join. - - From column. - To column. - - - - - Rights the inner join. - - From column. - To column. - - - - - Lefts the outer join. - - From column. - To column. - - - - - Rights the outer join. - - From column. - To column. - - - - - Nots the equal join. - - From column. - To column. - - - - - Orders the asc. - - The columns. - - - - - Orders the desc. - - The columns. - - - - - Pageds the specified current page. - - The current page. - Size of the page. - - - - - Pageds the specified current page. - - The current page. - Size of the page. - The id column. - - - - - Executes this instance. - - - - - - Executes the reader. - - - - - - Executes the scalar. - - - - - - Executes the scalar. - - The type of the result. - - - - - Gets the record count. - - - - - - Executes the typed list. - - - - - - - Executes the typed list. - - - - - - - Executes the query and returns the result as a single item of T - - The type of item to return - - - - Executes the transaction. - - The queries. - - - - Executes the transaction. - - The queries. - Name of the connection string. - - - - Gets or sets the open paren count. - - The open paren count. - - - - Gets or sets the closed paren count. - - The closed paren count. - - - - - - - - - Initializes a new instance of the class. + Initializes a new instance of the class. The query. - + Builds the paged select statement. - + Builds the insert statement. - + - - - - - - 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 - - The credit card. - - true if valid; otherwise, false. - - - - - Determines whether the specified string is an En Route card - - The credit card. - - true if valid; otherwise, false. - - - - - Determines whether the specified string is an JCB card - - The credit card. - - true if valid; otherwise, false. - - - - - Determines whether the specified string is a Master Card credit card - - The credit card. - - true if valid; otherwise, false. - - - - - 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. - - - - - Determines whether the credit card number, once cleaned, passes the Luhn algorith. - See: http://en.wikipedia.org/wiki/Luhn_algorithm - - The credit card number. - - - - - Determines whether the specified int array passes the Luhn algorith - - 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 - - The string to evaluated for numeric conversion - - true if the string can be converted to a number; otherwise, false. - - - - - Executes the specified SQL. - - - - - Executes the scalar. - - The type of the result. - - - - - Executes the typed list. + Singles the specified expression. + The expression. - + - Executes the reader. - - - - - - Type related helper methods - - - - - - - - - - Initializes a new instance of the class. - - The provider. - The columns. - - - - Initializes a new instance of the class. - - - - - Initializes a new instance of the class. - - The aggregates. - - - - Initializes a new instance of the class. - - The provider. - The aggregates. - - - - Initializes a new instance of the class. - - The columns. - - - - Initializes a new instance of the class. - WARNING: This overload should only be used with applications that use a single provider! - - The columns. - - - - Alls the columns from. + Singles the specified key. + The key. - + - Expressions the specified SQL expression. + Retrieves subset of records from the database matching the expression - The SQL expression. + + + + Gets the paged. + + + Index of the page. + Size of the page. - + - Tops the specified top. + Gets the paged. - The top. + + The sort by. + Index of the page. + Size of the page. - + - Removes the column. - - - - - - - - Sets the column attributes. - - The column. - - - - - Gets the type of the db. - - Type of the SQL. - - - - - Type related helper methods - - - - - Replaces references to one specific instance of an expression node with another node - - - - - TSQL specific QueryLanguage - - - - - returns the set of all aliases produced by a query source - - - - - Creates a set of SQL commands for synchronizing your database with your object set - - - - - Builds the delete query. + Adds the specified item, setting the key if available. + The item. - + - Builds the insert query. + Adds a lot of the items using a transaction. + + The items. + + + + Updates the specified item. + + The item. - + - Builds the update query. + Updates lots of items using a transaction. - The item. + + The items. - + - Creates a reusable, parameterized representation of a query that caches the execution plan + Deletes the specified key. - - - - Summary for the Dates class - - - - - Returns a date in the past by days. - - The days. + + The key. - + - Returns a date in the future by days. + Deletes 1 or more items. - The days. + + The expression. - + - Returns a date in the past by hours. + Deletes 1 or more items. - The hours. + + The items. - + - Returns a date in the future by hours. + Migrates this instance. - The hours. - + - + - Returns a date in the past by minutes - - The minutes. - - - - - Returns a date in the future by minutes. - - The minutes. - - - - - Gets a date in the past according to seconds - - The seconds. - - - - - Gets a date in the future by seconds. - - The seconds. - - - - - Diffs the specified date. - - The date one. - The date two. - - - - - Returns a double indicating the number of days between two dates (past is negative) - - The date one. - The date two. - - - - - Returns a double indicating the number of days between two dates (past is negative) - - The date one. - The date two. - - - - - Returns a double indicating the number of days between two dates (past is negative) - - The date one. - The date two. - - - - - Returns a double indicating the number of days between two dates (past is negative) - - The date one. - The date two. - - - - - Returns a double indicating the number of days between two dates (past is negative) - - The date one. - The date two. - - - - - Returns a double indicating the number of days between two dates (past is negative) - - 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" - - The start time. - The end time. - - - - - Counts the number of weekdays between two dates. - - The start time. - The end time. - - - - - Counts the number of weekends between two dates. - - The start time. - The end time. - - - - - Verifies if the object is a date - - The dt. - - true if the specified dt is date; otherwise, false. - - - - - Checks to see if the date is a week day (Mon - Fri) - - The dt. - - true if [is week day] [the specified dt]; otherwise, false. - - - - - Checks to see if the date is Saturday or Sunday - - 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" - - The start time. - The end time. - - - - - Given a datetime object, returns the formatted month and day, i.e. "April 15th" - - The date to extract the string from - - - - - Given a datetime object, returns the formatted day, "15th" - - The date to extract the string from - - - - - Remove leading strings with zeros and adjust for singular/plural - - The STR. - The previous STR. - The t. - - - - - An enumeration value for no options configured. - - - - - The default set of options (right now the same as none). - - - - - Use this flag to let the repository run migrations. - - - - - - - - - - - - - - - - - - - - Removes select expressions that don't add any additional semantic value - - - - - Rewrite all column references to one or more aliases to a new single alias + 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. @@ -4208,362 +4541,46 @@ The word. - + - Process the passed-in LINQ expression + Summary for the Files class - - + - Sets the column attributes. + Read a text file and obtain it's contents. - The column. + 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. - - - Gets the type of the db. - - Type of the SQL. - - - - - A Repository class which wraps the a Database by type - - - - - Loads a T object - - - The item. - The column. - The value. - - - - - Loads a T object - - - The item. - The expression. - - - - - Returns all T items - - - - - Returns a single record - - - - - Returns a server-side Paged List - - - - - Returns a server-side Paged List - - - - - Returns a server-side Paged List - - - - - Returns an IQueryable based on the passed-in Expression Chinook Database - - - - - Returns an IQueryable based on the passed-in Expression Chinook Database - - - - - Adds a T item to the db - - - - - Adds a T item to the db - - - - - Adds a bunch of T items - - - - - Adds a bunch of T items - - - - - Updates the passed-in T - - - - - Updates the passed-in T - - - - - Updates the passed-in T - - - - - Updates the passed-in T - - - - - Deletes the passed-in T items - - - - - Deletes the passed-in T items - - - - - Deletes the passed-in T item - - - - - Deletes the passed-in T item - - - - - Deletes the T item by Primary Key - - - - - Deletes the T item by Primary Key - - - - - Deletes 0 to n T items from the Database based on the passed-in Expression - - - - - Deletes 0 to n T items from the Database based on the passed-in Expression - - - - - Singles the specified expression. - - - The expression. - - - - - Singles the specified key. - - - The key. - - - - - Retrieves subset of records from the database matching the expression - - - - - Gets the paged. - - - Index of the page. - Size of the page. - - - - - Gets the paged. - - - The sort by. - Index of the page. - Size of the page. - - - - - Adds the specified item, setting the key if available. - - - The item. - - - - - Adds a lot of the items using a transaction. - - - The items. - - - - Updates the specified item. - - - The item. - - - - - Updates lots of items using a transaction. - - - The items. - - - - - Deletes the specified key. - - - The key. - - - - - Deletes 1 or more items. - - - The expression. - - - - - Deletes 1 or more items. - - - The items. - - - - - Migrates this instance. - - - - - - Rewrites an expression tree so that locally isolatable sub-expressions are evaluated and converted into ConstantExpression nodes. - - - - - 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. - - - - Performs evaluation and replacement of independent sub-trees - - 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) - - - - - Performs bottom-up analysis to determine which nodes can possibly - be part of an evaluated sub-tree. - - - - - Formats a query expression into TSQL language syntax - - - - - TSQL specific QueryLanguage - - - - - - - - - - Initializes a new instance of the class. - - The query. - - - - Gets the type of the native. - - Type of the db. - - - - - Generates SQL for all the columns in table - - Table containing the columns. - - SQL fragment representing the supplied columns. - - - - - Generates from list. - - - - - - Sets the column attributes. - - The column. - - - - - Builds the paged select statement. - - - - - - Finds the first sub-expression that accesses a Query<T> object - - - - - Removes column declarations in SelectExpression's that are not referenced - - 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