diff options
author | Andrew Arnott <andrewarnott@gmail.com> | 2010-04-19 07:09:32 -0400 |
---|---|---|
committer | Andrew Arnott <andrewarnott@gmail.com> | 2010-04-19 07:09:32 -0400 |
commit | 668c50fd19dc633bd367ac8ace37df8b5f9a5881 (patch) | |
tree | 8ab71b553fa22e12aae6817b3c6fab93acdd31df /samples/OAuthServiceProvider/Code/DataClasses.designer.cs | |
parent | fef932af78eac2b775452c4a851e84a813027548 (diff) | |
download | DotNetOpenAuth-668c50fd19dc633bd367ac8ace37df8b5f9a5881.zip DotNetOpenAuth-668c50fd19dc633bd367ac8ace37df8b5f9a5881.tar.gz DotNetOpenAuth-668c50fd19dc633bd367ac8ace37df8b5f9a5881.tar.bz2 |
Updated OAuth C and SP samples to use standard WAP namespaces.
Diffstat (limited to 'samples/OAuthServiceProvider/Code/DataClasses.designer.cs')
-rw-r--r-- | samples/OAuthServiceProvider/Code/DataClasses.designer.cs | 1790 |
1 files changed, 896 insertions, 894 deletions
diff --git a/samples/OAuthServiceProvider/Code/DataClasses.designer.cs b/samples/OAuthServiceProvider/Code/DataClasses.designer.cs index 89757e5..3c0d936 100644 --- a/samples/OAuthServiceProvider/Code/DataClasses.designer.cs +++ b/samples/OAuthServiceProvider/Code/DataClasses.designer.cs @@ -9,134 +9,135 @@ // </auto-generated> //------------------------------------------------------------------------------ -using System; -using System.Collections.Generic; -using System.ComponentModel; -using System.Data; -using System.Data.Linq; -using System.Data.Linq.Mapping; -using System.Linq; -using System.Linq.Expressions; -using System.Reflection; - - - -[global::System.Data.Linq.Mapping.DatabaseAttribute(Name="Database")] -public partial class DataClassesDataContext : System.Data.Linq.DataContext +namespace OAuthServiceProvider.Code { - - private static System.Data.Linq.Mapping.MappingSource mappingSource = new AttributeMappingSource(); - - #region Extensibility Method Definitions - partial void OnCreated(); - partial void InsertUser(User instance); - partial void UpdateUser(User instance); - partial void DeleteUser(User instance); - partial void InsertFavoriteSite(FavoriteSite instance); - partial void UpdateFavoriteSite(FavoriteSite instance); - partial void DeleteFavoriteSite(FavoriteSite instance); - partial void InsertOAuthConsumer(OAuthConsumer instance); - partial void UpdateOAuthConsumer(OAuthConsumer instance); - partial void DeleteOAuthConsumer(OAuthConsumer instance); - partial void InsertOAuthToken(OAuthToken instance); - partial void UpdateOAuthToken(OAuthToken instance); - partial void DeleteOAuthToken(OAuthToken instance); - partial void InsertNonce(Nonce instance); - partial void UpdateNonce(Nonce instance); - partial void DeleteNonce(Nonce instance); - #endregion - - public DataClassesDataContext() : - base(global::System.Configuration.ConfigurationManager.ConnectionStrings["DatabaseConnectionString"].ConnectionString, mappingSource) - { - OnCreated(); - } - - public DataClassesDataContext(string connection) : - base(connection, mappingSource) - { - OnCreated(); - } - - public DataClassesDataContext(System.Data.IDbConnection connection) : - base(connection, mappingSource) - { - OnCreated(); - } - - public DataClassesDataContext(string connection, System.Data.Linq.Mapping.MappingSource mappingSource) : - base(connection, mappingSource) - { - OnCreated(); - } - - public DataClassesDataContext(System.Data.IDbConnection connection, System.Data.Linq.Mapping.MappingSource mappingSource) : - base(connection, mappingSource) - { - OnCreated(); - } - - public System.Data.Linq.Table<User> Users - { - get + using System.Data.Linq; + using System.Data.Linq.Mapping; + using System.Data; + using System.Collections.Generic; + using System.Reflection; + using System.Linq; + using System.Linq.Expressions; + using System.ComponentModel; + using System; + + + [global::System.Data.Linq.Mapping.DatabaseAttribute(Name="Database")] + public partial class DataClassesDataContext : System.Data.Linq.DataContext + { + + private static System.Data.Linq.Mapping.MappingSource mappingSource = new AttributeMappingSource(); + + #region Extensibility Method Definitions + partial void OnCreated(); + partial void InsertUser(User instance); + partial void UpdateUser(User instance); + partial void DeleteUser(User instance); + partial void InsertFavoriteSite(FavoriteSite instance); + partial void UpdateFavoriteSite(FavoriteSite instance); + partial void DeleteFavoriteSite(FavoriteSite instance); + partial void InsertOAuthConsumer(OAuthConsumer instance); + partial void UpdateOAuthConsumer(OAuthConsumer instance); + partial void DeleteOAuthConsumer(OAuthConsumer instance); + partial void InsertOAuthToken(OAuthToken instance); + partial void UpdateOAuthToken(OAuthToken instance); + partial void DeleteOAuthToken(OAuthToken instance); + partial void InsertNonce(Nonce instance); + partial void UpdateNonce(Nonce instance); + partial void DeleteNonce(Nonce instance); + #endregion + + public DataClassesDataContext() : + base(global::System.Configuration.ConfigurationManager.ConnectionStrings["DatabaseConnectionString"].ConnectionString, mappingSource) { - return this.GetTable<User>(); + OnCreated(); } - } - - public System.Data.Linq.Table<FavoriteSite> FavoriteSites - { - get + + public DataClassesDataContext(string connection) : + base(connection, mappingSource) { - return this.GetTable<FavoriteSite>(); + OnCreated(); } - } - - public System.Data.Linq.Table<OAuthConsumer> OAuthConsumers - { - get + + public DataClassesDataContext(System.Data.IDbConnection connection) : + base(connection, mappingSource) { - return this.GetTable<OAuthConsumer>(); + OnCreated(); } - } - - public System.Data.Linq.Table<OAuthToken> OAuthTokens - { - get + + public DataClassesDataContext(string connection, System.Data.Linq.Mapping.MappingSource mappingSource) : + base(connection, mappingSource) { - return this.GetTable<OAuthToken>(); + OnCreated(); } - } - - public System.Data.Linq.Table<Nonce> Nonces - { - get + + public DataClassesDataContext(System.Data.IDbConnection connection, System.Data.Linq.Mapping.MappingSource mappingSource) : + base(connection, mappingSource) + { + OnCreated(); + } + + public System.Data.Linq.Table<User> Users { - return this.GetTable<Nonce>(); + get + { + return this.GetTable<User>(); + } + } + + public System.Data.Linq.Table<FavoriteSite> FavoriteSites + { + get + { + return this.GetTable<FavoriteSite>(); + } + } + + public System.Data.Linq.Table<OAuthConsumer> OAuthConsumers + { + get + { + return this.GetTable<OAuthConsumer>(); + } + } + + public System.Data.Linq.Table<OAuthToken> OAuthTokens + { + get + { + return this.GetTable<OAuthToken>(); + } + } + + public System.Data.Linq.Table<Nonce> Nonces + { + get + { + return this.GetTable<Nonce>(); + } } } -} - -[global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.[User]")] -public partial class User : INotifyPropertyChanging, INotifyPropertyChanged -{ - - private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty); - - private int _UserId; - - private string _OpenIDClaimedIdentifier; - - private string _OpenIDFriendlyIdentifier; - - private string _FullName; - - private System.Nullable<int> _Age; - - private EntitySet<FavoriteSite> _FavoriteSites; - - private EntitySet<OAuthToken> _OAuthTokens; + [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.[User]")] + public partial class User : INotifyPropertyChanging, INotifyPropertyChanged + { + + private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty); + + private int _UserId; + + private string _OpenIDClaimedIdentifier; + + private string _OpenIDFriendlyIdentifier; + + private string _FullName; + + private System.Nullable<int> _Age; + + private EntitySet<FavoriteSite> _FavoriteSites; + + private EntitySet<OAuthToken> _OAuthTokens; + #region Extensibility Method Definitions partial void OnLoaded(); partial void OnValidate(System.Data.Linq.ChangeAction action); @@ -152,199 +153,199 @@ public partial class User : INotifyPropertyChanging, INotifyPropertyChanged partial void OnAgeChanging(System.Nullable<int> value); partial void OnAgeChanged(); #endregion - - public User() - { - this._FavoriteSites = new EntitySet<FavoriteSite>(new Action<FavoriteSite>(this.attach_FavoriteSites), new Action<FavoriteSite>(this.detach_FavoriteSites)); - this._OAuthTokens = new EntitySet<OAuthToken>(new Action<OAuthToken>(this.attach_OAuthTokens), new Action<OAuthToken>(this.detach_OAuthTokens)); - OnCreated(); - } - - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UserId", AutoSync=AutoSync.OnInsert, DbType="Int NOT NULL IDENTITY", IsPrimaryKey=true, IsDbGenerated=true)] - public int UserId - { - get + + public User() { - return this._UserId; + this._FavoriteSites = new EntitySet<FavoriteSite>(new Action<FavoriteSite>(this.attach_FavoriteSites), new Action<FavoriteSite>(this.detach_FavoriteSites)); + this._OAuthTokens = new EntitySet<OAuthToken>(new Action<OAuthToken>(this.attach_OAuthTokens), new Action<OAuthToken>(this.detach_OAuthTokens)); + OnCreated(); } - set + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UserId", AutoSync=AutoSync.OnInsert, DbType="Int NOT NULL IDENTITY", IsPrimaryKey=true, IsDbGenerated=true)] + public int UserId { - if ((this._UserId != value)) + get { - this.OnUserIdChanging(value); - this.SendPropertyChanging(); - this._UserId = value; - this.SendPropertyChanged("UserId"); - this.OnUserIdChanged(); + return this._UserId; } - } - } - - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_OpenIDClaimedIdentifier", DbType="NVarChar(150) NOT NULL", CanBeNull=false)] - public string OpenIDClaimedIdentifier - { - get - { - return this._OpenIDClaimedIdentifier; - } - set - { - if ((this._OpenIDClaimedIdentifier != value)) + set { - this.OnOpenIDClaimedIdentifierChanging(value); - this.SendPropertyChanging(); - this._OpenIDClaimedIdentifier = value; - this.SendPropertyChanged("OpenIDClaimedIdentifier"); - this.OnOpenIDClaimedIdentifierChanged(); + if ((this._UserId != value)) + { + this.OnUserIdChanging(value); + this.SendPropertyChanging(); + this._UserId = value; + this.SendPropertyChanged("UserId"); + this.OnUserIdChanged(); + } } } - } - - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_OpenIDFriendlyIdentifier", DbType="NVarChar(150)")] - public string OpenIDFriendlyIdentifier - { - get + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_OpenIDClaimedIdentifier", DbType="NVarChar(150) NOT NULL", CanBeNull=false)] + public string OpenIDClaimedIdentifier { - return this._OpenIDFriendlyIdentifier; + get + { + return this._OpenIDClaimedIdentifier; + } + set + { + if ((this._OpenIDClaimedIdentifier != value)) + { + this.OnOpenIDClaimedIdentifierChanging(value); + this.SendPropertyChanging(); + this._OpenIDClaimedIdentifier = value; + this.SendPropertyChanged("OpenIDClaimedIdentifier"); + this.OnOpenIDClaimedIdentifierChanged(); + } + } } - set + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_OpenIDFriendlyIdentifier", DbType="NVarChar(150)")] + public string OpenIDFriendlyIdentifier { - if ((this._OpenIDFriendlyIdentifier != value)) + get { - this.OnOpenIDFriendlyIdentifierChanging(value); - this.SendPropertyChanging(); - this._OpenIDFriendlyIdentifier = value; - this.SendPropertyChanged("OpenIDFriendlyIdentifier"); - this.OnOpenIDFriendlyIdentifierChanged(); + return this._OpenIDFriendlyIdentifier; + } + set + { + if ((this._OpenIDFriendlyIdentifier != value)) + { + this.OnOpenIDFriendlyIdentifierChanging(value); + this.SendPropertyChanging(); + this._OpenIDFriendlyIdentifier = value; + this.SendPropertyChanged("OpenIDFriendlyIdentifier"); + this.OnOpenIDFriendlyIdentifierChanged(); + } } } - } - - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_FullName", DbType="NVarChar(150)", CanBeNull=false)] - public string FullName - { - get + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_FullName", DbType="NVarChar(150)", CanBeNull=false)] + public string FullName { - return this._FullName; + get + { + return this._FullName; + } + set + { + if ((this._FullName != value)) + { + this.OnFullNameChanging(value); + this.SendPropertyChanging(); + this._FullName = value; + this.SendPropertyChanged("FullName"); + this.OnFullNameChanged(); + } + } } - set + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Age", DbType="int")] + public System.Nullable<int> Age { - if ((this._FullName != value)) + get { - this.OnFullNameChanging(value); - this.SendPropertyChanging(); - this._FullName = value; - this.SendPropertyChanged("FullName"); - this.OnFullNameChanged(); + return this._Age; + } + set + { + if ((this._Age != value)) + { + this.OnAgeChanging(value); + this.SendPropertyChanging(); + this._Age = value; + this.SendPropertyChanged("Age"); + this.OnAgeChanged(); + } } } - } - - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Age", DbType="int")] - public System.Nullable<int> Age - { - get + + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="User_FavoriteSite", Storage="_FavoriteSites", ThisKey="UserId", OtherKey="UserId")] + public EntitySet<FavoriteSite> FavoriteSites { - return this._Age; + get + { + return this._FavoriteSites; + } + set + { + this._FavoriteSites.Assign(value); + } } - set + + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="User_OAuthToken", Storage="_OAuthTokens", ThisKey="UserId", OtherKey="UserId")] + public EntitySet<OAuthToken> OAuthTokens { - if ((this._Age != value)) + get { - this.OnAgeChanging(value); - this.SendPropertyChanging(); - this._Age = value; - this.SendPropertyChanged("Age"); - this.OnAgeChanged(); + return this._OAuthTokens; + } + set + { + this._OAuthTokens.Assign(value); } } - } - - [global::System.Data.Linq.Mapping.AssociationAttribute(Name="User_FavoriteSite", Storage="_FavoriteSites", ThisKey="UserId", OtherKey="UserId")] - public EntitySet<FavoriteSite> FavoriteSites - { - get + + public event PropertyChangingEventHandler PropertyChanging; + + public event PropertyChangedEventHandler PropertyChanged; + + protected virtual void SendPropertyChanging() { - return this._FavoriteSites; + if ((this.PropertyChanging != null)) + { + this.PropertyChanging(this, emptyChangingEventArgs); + } } - set + + protected virtual void SendPropertyChanged(String propertyName) { - this._FavoriteSites.Assign(value); + if ((this.PropertyChanged != null)) + { + this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName)); + } } - } - - [global::System.Data.Linq.Mapping.AssociationAttribute(Name="User_OAuthToken", Storage="_OAuthTokens", ThisKey="UserId", OtherKey="UserId")] - public EntitySet<OAuthToken> OAuthTokens - { - get + + private void attach_FavoriteSites(FavoriteSite entity) { - return this._OAuthTokens; + this.SendPropertyChanging(); + entity.User = this; } - set + + private void detach_FavoriteSites(FavoriteSite entity) { - this._OAuthTokens.Assign(value); + this.SendPropertyChanging(); + entity.User = null; } - } - - public event PropertyChangingEventHandler PropertyChanging; - - public event PropertyChangedEventHandler PropertyChanged; - - protected virtual void SendPropertyChanging() - { - if ((this.PropertyChanging != null)) + + private void attach_OAuthTokens(OAuthToken entity) { - this.PropertyChanging(this, emptyChangingEventArgs); + this.SendPropertyChanging(); + entity.User = this; } - } - - protected virtual void SendPropertyChanged(String propertyName) - { - if ((this.PropertyChanged != null)) + + private void detach_OAuthTokens(OAuthToken entity) { - this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName)); + this.SendPropertyChanging(); + entity.User = null; } } - private void attach_FavoriteSites(FavoriteSite entity) + [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.FavoriteSite")] + public partial class FavoriteSite : INotifyPropertyChanging, INotifyPropertyChanged { - this.SendPropertyChanging(); - entity.User = this; - } - - private void detach_FavoriteSites(FavoriteSite entity) - { - this.SendPropertyChanging(); - entity.User = null; - } - - private void attach_OAuthTokens(OAuthToken entity) - { - this.SendPropertyChanging(); - entity.User = this; - } - - private void detach_OAuthTokens(OAuthToken entity) - { - this.SendPropertyChanging(); - entity.User = null; - } -} - -[global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.FavoriteSite")] -public partial class FavoriteSite : INotifyPropertyChanging, INotifyPropertyChanged -{ - - private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty); - - private int _FavoriteSiteId; - - private int _UserId; - - private string _SiteUrl; - - private EntityRef<User> _User; - + + private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty); + + private int _FavoriteSiteId; + + private int _UserId; + + private string _SiteUrl; + + private EntityRef<User> _User; + #region Extensibility Method Definitions partial void OnLoaded(); partial void OnValidate(System.Data.Linq.ChangeAction action); @@ -356,152 +357,152 @@ public partial class FavoriteSite : INotifyPropertyChanging, INotifyPropertyChan partial void OnSiteUrlChanging(string value); partial void OnSiteUrlChanged(); #endregion - - public FavoriteSite() - { - this._User = default(EntityRef<User>); - OnCreated(); - } - - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_FavoriteSiteId", AutoSync=AutoSync.OnInsert, DbType="Int NOT NULL IDENTITY", IsPrimaryKey=true, IsDbGenerated=true)] - public int FavoriteSiteId - { - get + + public FavoriteSite() { - return this._FavoriteSiteId; + this._User = default(EntityRef<User>); + OnCreated(); } - set + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_FavoriteSiteId", AutoSync=AutoSync.OnInsert, DbType="Int NOT NULL IDENTITY", IsPrimaryKey=true, IsDbGenerated=true)] + public int FavoriteSiteId { - if ((this._FavoriteSiteId != value)) + get { - this.OnFavoriteSiteIdChanging(value); - this.SendPropertyChanging(); - this._FavoriteSiteId = value; - this.SendPropertyChanged("FavoriteSiteId"); - this.OnFavoriteSiteIdChanged(); + return this._FavoriteSiteId; } - } - } - - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UserId", DbType="Int NOT NULL")] - public int UserId - { - get - { - return this._UserId; - } - set - { - if ((this._UserId != value)) + set { - if (this._User.HasLoadedOrAssignedValue) + if ((this._FavoriteSiteId != value)) { - throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException(); + this.OnFavoriteSiteIdChanging(value); + this.SendPropertyChanging(); + this._FavoriteSiteId = value; + this.SendPropertyChanged("FavoriteSiteId"); + this.OnFavoriteSiteIdChanged(); } - this.OnUserIdChanging(value); - this.SendPropertyChanging(); - this._UserId = value; - this.SendPropertyChanged("UserId"); - this.OnUserIdChanged(); } } - } - - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_SiteUrl", DbType="NVarChar(255) NOT NULL", CanBeNull=false)] - public string SiteUrl - { - get - { - return this._SiteUrl; - } - set + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UserId", DbType="Int NOT NULL")] + public int UserId { - if ((this._SiteUrl != value)) + get { - this.OnSiteUrlChanging(value); - this.SendPropertyChanging(); - this._SiteUrl = value; - this.SendPropertyChanged("SiteUrl"); - this.OnSiteUrlChanged(); + return this._UserId; } - } - } - - [global::System.Data.Linq.Mapping.AssociationAttribute(Name="User_FavoriteSite", Storage="_User", ThisKey="UserId", OtherKey="UserId", IsForeignKey=true, DeleteOnNull=true, DeleteRule="CASCADE")] - public User User - { - get - { - return this._User.Entity; - } - set - { - User previousValue = this._User.Entity; - if (((previousValue != value) - || (this._User.HasLoadedOrAssignedValue == false))) + set { - this.SendPropertyChanging(); - if ((previousValue != null)) + if ((this._UserId != value)) { - this._User.Entity = null; - previousValue.FavoriteSites.Remove(this); + if (this._User.HasLoadedOrAssignedValue) + { + throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException(); + } + this.OnUserIdChanging(value); + this.SendPropertyChanging(); + this._UserId = value; + this.SendPropertyChanged("UserId"); + this.OnUserIdChanged(); } - this._User.Entity = value; - if ((value != null)) + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_SiteUrl", DbType="NVarChar(255) NOT NULL", CanBeNull=false)] + public string SiteUrl + { + get + { + return this._SiteUrl; + } + set + { + if ((this._SiteUrl != value)) { - value.FavoriteSites.Add(this); - this._UserId = value.UserId; + this.OnSiteUrlChanging(value); + this.SendPropertyChanging(); + this._SiteUrl = value; + this.SendPropertyChanged("SiteUrl"); + this.OnSiteUrlChanged(); } - else + } + } + + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="User_FavoriteSite", Storage="_User", ThisKey="UserId", OtherKey="UserId", IsForeignKey=true, DeleteOnNull=true, DeleteRule="CASCADE")] + public User User + { + get + { + return this._User.Entity; + } + set + { + User previousValue = this._User.Entity; + if (((previousValue != value) + || (this._User.HasLoadedOrAssignedValue == false))) { - this._UserId = default(int); + this.SendPropertyChanging(); + if ((previousValue != null)) + { + this._User.Entity = null; + previousValue.FavoriteSites.Remove(this); + } + this._User.Entity = value; + if ((value != null)) + { + value.FavoriteSites.Add(this); + this._UserId = value.UserId; + } + else + { + this._UserId = default(int); + } + this.SendPropertyChanged("User"); } - this.SendPropertyChanged("User"); } } - } - - public event PropertyChangingEventHandler PropertyChanging; - - public event PropertyChangedEventHandler PropertyChanged; - - protected virtual void SendPropertyChanging() - { - if ((this.PropertyChanging != null)) + + public event PropertyChangingEventHandler PropertyChanging; + + public event PropertyChangedEventHandler PropertyChanged; + + protected virtual void SendPropertyChanging() { - this.PropertyChanging(this, emptyChangingEventArgs); + if ((this.PropertyChanging != null)) + { + this.PropertyChanging(this, emptyChangingEventArgs); + } } - } - - protected virtual void SendPropertyChanged(String propertyName) - { - if ((this.PropertyChanged != null)) + + protected virtual void SendPropertyChanged(String propertyName) { - this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName)); + if ((this.PropertyChanged != null)) + { + this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName)); + } } } -} - -[global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.OAuthConsumer")] -public partial class OAuthConsumer : INotifyPropertyChanging, INotifyPropertyChanged -{ - - private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty); - - private int _ConsumerId; - - private string _ConsumerKey; - - private string _ConsumerSecret; - - private string _Callback; - - private DotNetOpenAuth.OAuth.VerificationCodeFormat _VerificationCodeFormat; - - private int _VerificationCodeLength; - - private EntitySet<OAuthToken> _OAuthTokens; + [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.OAuthConsumer")] + public partial class OAuthConsumer : INotifyPropertyChanging, INotifyPropertyChanged + { + + private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty); + + private int _ConsumerId; + + private string _ConsumerKey; + + private string _ConsumerSecret; + + private string _Callback; + + private DotNetOpenAuth.OAuth.VerificationCodeFormat _VerificationCodeFormat; + + private int _VerificationCodeLength; + + private EntitySet<OAuthToken> _OAuthTokens; + #region Extensibility Method Definitions partial void OnLoaded(); partial void OnValidate(System.Data.Linq.ChangeAction action); @@ -519,211 +520,211 @@ public partial class OAuthConsumer : INotifyPropertyChanging, INotifyPropertyCha partial void OnVerificationCodeLengthChanging(int value); partial void OnVerificationCodeLengthChanged(); #endregion - - public OAuthConsumer() - { - this._OAuthTokens = new EntitySet<OAuthToken>(new Action<OAuthToken>(this.attach_OAuthTokens), new Action<OAuthToken>(this.detach_OAuthTokens)); - OnCreated(); - } - - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ConsumerId", AutoSync=AutoSync.OnInsert, DbType="Int NOT NULL IDENTITY", IsPrimaryKey=true, IsDbGenerated=true)] - public int ConsumerId - { - get + + public OAuthConsumer() { - return this._ConsumerId; + this._OAuthTokens = new EntitySet<OAuthToken>(new Action<OAuthToken>(this.attach_OAuthTokens), new Action<OAuthToken>(this.detach_OAuthTokens)); + OnCreated(); } - set + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ConsumerId", AutoSync=AutoSync.OnInsert, DbType="Int NOT NULL IDENTITY", IsPrimaryKey=true, IsDbGenerated=true)] + public int ConsumerId { - if ((this._ConsumerId != value)) + get { - this.OnConsumerIdChanging(value); - this.SendPropertyChanging(); - this._ConsumerId = value; - this.SendPropertyChanged("ConsumerId"); - this.OnConsumerIdChanged(); + return this._ConsumerId; } - } - } - - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ConsumerKey", DbType="NVarChar(50) NOT NULL", CanBeNull=false)] - public string ConsumerKey - { - get - { - return this._ConsumerKey; - } - set - { - if ((this._ConsumerKey != value)) + set { - this.OnConsumerKeyChanging(value); - this.SendPropertyChanging(); - this._ConsumerKey = value; - this.SendPropertyChanged("ConsumerKey"); - this.OnConsumerKeyChanged(); + if ((this._ConsumerId != value)) + { + this.OnConsumerIdChanging(value); + this.SendPropertyChanging(); + this._ConsumerId = value; + this.SendPropertyChanged("ConsumerId"); + this.OnConsumerIdChanged(); + } } } - } - - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ConsumerSecret", DbType="NVarChar(50) NOT NULL", CanBeNull=false)] - public string ConsumerSecret - { - get - { - return this._ConsumerSecret; - } - set + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ConsumerKey", DbType="NVarChar(50) NOT NULL", CanBeNull=false)] + public string ConsumerKey { - if ((this._ConsumerSecret != value)) + get { - this.OnConsumerSecretChanging(value); - this.SendPropertyChanging(); - this._ConsumerSecret = value; - this.SendPropertyChanged("ConsumerSecret"); - this.OnConsumerSecretChanged(); + return this._ConsumerKey; } - } - } - - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Callback")] - public string Callback - { - get - { - return this._Callback; - } - set - { - if ((this._Callback != value)) + set { - this.OnCallbackChanging(value); - this.SendPropertyChanging(); - this._Callback = value; - this.SendPropertyChanged("Callback"); - this.OnCallbackChanged(); + if ((this._ConsumerKey != value)) + { + this.OnConsumerKeyChanging(value); + this.SendPropertyChanging(); + this._ConsumerKey = value; + this.SendPropertyChanged("ConsumerKey"); + this.OnConsumerKeyChanged(); + } } } - } - - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_VerificationCodeFormat", CanBeNull=false)] - public DotNetOpenAuth.OAuth.VerificationCodeFormat VerificationCodeFormat - { - get + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ConsumerSecret", DbType="NVarChar(50) NOT NULL", CanBeNull=false)] + public string ConsumerSecret { - return this._VerificationCodeFormat; - } - set - { - if ((this._VerificationCodeFormat != value)) + get + { + return this._ConsumerSecret; + } + set { - this.OnVerificationCodeFormatChanging(value); - this.SendPropertyChanging(); - this._VerificationCodeFormat = value; - this.SendPropertyChanged("VerificationCodeFormat"); - this.OnVerificationCodeFormatChanged(); + if ((this._ConsumerSecret != value)) + { + this.OnConsumerSecretChanging(value); + this.SendPropertyChanging(); + this._ConsumerSecret = value; + this.SendPropertyChanged("ConsumerSecret"); + this.OnConsumerSecretChanged(); + } } } - } - - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_VerificationCodeLength")] - public int VerificationCodeLength - { - get + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Callback")] + public string Callback { - return this._VerificationCodeLength; + get + { + return this._Callback; + } + set + { + if ((this._Callback != value)) + { + this.OnCallbackChanging(value); + this.SendPropertyChanging(); + this._Callback = value; + this.SendPropertyChanged("Callback"); + this.OnCallbackChanged(); + } + } } - set + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_VerificationCodeFormat")] + public DotNetOpenAuth.OAuth.VerificationCodeFormat VerificationCodeFormat { - if ((this._VerificationCodeLength != value)) + get { - this.OnVerificationCodeLengthChanging(value); - this.SendPropertyChanging(); - this._VerificationCodeLength = value; - this.SendPropertyChanged("VerificationCodeLength"); - this.OnVerificationCodeLengthChanged(); + return this._VerificationCodeFormat; + } + set + { + if ((this._VerificationCodeFormat != value)) + { + this.OnVerificationCodeFormatChanging(value); + this.SendPropertyChanging(); + this._VerificationCodeFormat = value; + this.SendPropertyChanged("VerificationCodeFormat"); + this.OnVerificationCodeFormatChanged(); + } } } - } - - [global::System.Data.Linq.Mapping.AssociationAttribute(Name="OAuthConsumer_OAuthToken", Storage="_OAuthTokens", ThisKey="ConsumerId", OtherKey="ConsumerId")] - public EntitySet<OAuthToken> OAuthTokens - { - get + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_VerificationCodeLength")] + public int VerificationCodeLength { - return this._OAuthTokens; + get + { + return this._VerificationCodeLength; + } + set + { + if ((this._VerificationCodeLength != value)) + { + this.OnVerificationCodeLengthChanging(value); + this.SendPropertyChanging(); + this._VerificationCodeLength = value; + this.SendPropertyChanged("VerificationCodeLength"); + this.OnVerificationCodeLengthChanged(); + } + } } - set + + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="OAuthConsumer_OAuthToken", Storage="_OAuthTokens", ThisKey="ConsumerId", OtherKey="ConsumerId")] + public EntitySet<OAuthToken> OAuthTokens { - this._OAuthTokens.Assign(value); + get + { + return this._OAuthTokens; + } + set + { + this._OAuthTokens.Assign(value); + } } - } - - public event PropertyChangingEventHandler PropertyChanging; - - public event PropertyChangedEventHandler PropertyChanged; - - protected virtual void SendPropertyChanging() - { - if ((this.PropertyChanging != null)) + + public event PropertyChangingEventHandler PropertyChanging; + + public event PropertyChangedEventHandler PropertyChanged; + + protected virtual void SendPropertyChanging() { - this.PropertyChanging(this, emptyChangingEventArgs); + if ((this.PropertyChanging != null)) + { + this.PropertyChanging(this, emptyChangingEventArgs); + } } - } - - protected virtual void SendPropertyChanged(String propertyName) - { - if ((this.PropertyChanged != null)) + + protected virtual void SendPropertyChanged(String propertyName) { - this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName)); + if ((this.PropertyChanged != null)) + { + this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName)); + } } - } - - private void attach_OAuthTokens(OAuthToken entity) - { - this.SendPropertyChanging(); - entity.OAuthConsumer = this; - } - - private void detach_OAuthTokens(OAuthToken entity) - { - this.SendPropertyChanging(); - entity.OAuthConsumer = null; - } -} - -[global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.OAuthToken")] -public partial class OAuthToken : INotifyPropertyChanging, INotifyPropertyChanged -{ - - private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty); - - private int _TokenId; - - private string _Token; - - private string _TokenSecret; - - private TokenAuthorizationState _State; - - private System.DateTime _IssueDate; - - private int _ConsumerId; - - private System.Nullable<int> _UserId; - - private string _Scope; - - private string _RequestTokenVerifier; - - private string _RequestTokenCallback; - - private string _ConsumerVersion; - - private EntityRef<OAuthConsumer> _OAuthConsumer; - - private EntityRef<User> _User; - + + private void attach_OAuthTokens(OAuthToken entity) + { + this.SendPropertyChanging(); + entity.OAuthConsumer = this; + } + + private void detach_OAuthTokens(OAuthToken entity) + { + this.SendPropertyChanging(); + entity.OAuthConsumer = null; + } + } + + [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.OAuthToken")] + public partial class OAuthToken : INotifyPropertyChanging, INotifyPropertyChanged + { + + private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty); + + private int _TokenId; + + private string _Token; + + private string _TokenSecret; + + private OAuthServiceProvider.Code.TokenAuthorizationState _State; + + private System.DateTime _IssueDate; + + private int _ConsumerId; + + private System.Nullable<int> _UserId; + + private string _Scope; + + private string _RequestTokenVerifier; + + private string _RequestTokenCallback; + + private string _ConsumerVersion; + + private EntityRef<OAuthConsumer> _OAuthConsumer; + + private EntityRef<User> _User; + #region Extensibility Method Definitions partial void OnLoaded(); partial void OnValidate(System.Data.Linq.ChangeAction action); @@ -734,7 +735,7 @@ public partial class OAuthToken : INotifyPropertyChanging, INotifyPropertyChange partial void OnTokenChanged(); partial void OnTokenSecretChanging(string value); partial void OnTokenSecretChanged(); - partial void OnStateChanging(TokenAuthorizationState value); + partial void OnStateChanging(OAuthServiceProvider.Code.TokenAuthorizationState value); partial void OnStateChanged(); partial void OnIssueDateChanging(System.DateTime value); partial void OnIssueDateChanged(); @@ -751,343 +752,343 @@ public partial class OAuthToken : INotifyPropertyChanging, INotifyPropertyChange partial void OnConsumerVersionChanging(string value); partial void OnConsumerVersionChanged(); #endregion - - public OAuthToken() - { - this._OAuthConsumer = default(EntityRef<OAuthConsumer>); - this._User = default(EntityRef<User>); - OnCreated(); - } - - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_TokenId", AutoSync=AutoSync.OnInsert, DbType="Int NOT NULL IDENTITY", IsPrimaryKey=true, IsDbGenerated=true)] - public int TokenId - { - get + + public OAuthToken() { - return this._TokenId; + this._OAuthConsumer = default(EntityRef<OAuthConsumer>); + this._User = default(EntityRef<User>); + OnCreated(); } - set + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_TokenId", AutoSync=AutoSync.OnInsert, DbType="Int NOT NULL IDENTITY", IsPrimaryKey=true, IsDbGenerated=true)] + public int TokenId { - if ((this._TokenId != value)) + get { - this.OnTokenIdChanging(value); - this.SendPropertyChanging(); - this._TokenId = value; - this.SendPropertyChanged("TokenId"); - this.OnTokenIdChanged(); + return this._TokenId; } - } - } - - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Token", DbType="NVarChar(50) NOT NULL", CanBeNull=false)] - public string Token - { - get - { - return this._Token; - } - set - { - if ((this._Token != value)) + set { - this.OnTokenChanging(value); - this.SendPropertyChanging(); - this._Token = value; - this.SendPropertyChanged("Token"); - this.OnTokenChanged(); + if ((this._TokenId != value)) + { + this.OnTokenIdChanging(value); + this.SendPropertyChanging(); + this._TokenId = value; + this.SendPropertyChanged("TokenId"); + this.OnTokenIdChanged(); + } } } - } - - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_TokenSecret", DbType="NVarChar(50) NOT NULL", CanBeNull=false)] - public string TokenSecret - { - get + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Token", DbType="NVarChar(50) NOT NULL", CanBeNull=false)] + public string Token { - return this._TokenSecret; - } - set - { - if ((this._TokenSecret != value)) + get { - this.OnTokenSecretChanging(value); - this.SendPropertyChanging(); - this._TokenSecret = value; - this.SendPropertyChanged("TokenSecret"); - this.OnTokenSecretChanged(); + return this._Token; } - } - } - - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_State", DbType="INT NOT NULL", CanBeNull=false)] - public TokenAuthorizationState State - { - get - { - return this._State; - } - set - { - if ((this._State != value)) + set { - this.OnStateChanging(value); - this.SendPropertyChanging(); - this._State = value; - this.SendPropertyChanged("State"); - this.OnStateChanged(); + if ((this._Token != value)) + { + this.OnTokenChanging(value); + this.SendPropertyChanging(); + this._Token = value; + this.SendPropertyChanged("Token"); + this.OnTokenChanged(); + } } } - } - - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_IssueDate", DbType="DateTime NOT NULL")] - public System.DateTime IssueDate - { - get + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_TokenSecret", DbType="NVarChar(50) NOT NULL", CanBeNull=false)] + public string TokenSecret { - return this._IssueDate; - } - set - { - if ((this._IssueDate != value)) + get { - this.OnIssueDateChanging(value); - this.SendPropertyChanging(); - this._IssueDate = value; - this.SendPropertyChanged("IssueDate"); - this.OnIssueDateChanged(); + return this._TokenSecret; } - } - } - - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ConsumerId", DbType="Int NOT NULL")] - public int ConsumerId - { - get - { - return this._ConsumerId; - } - set - { - if ((this._ConsumerId != value)) + set { - if (this._OAuthConsumer.HasLoadedOrAssignedValue) + if ((this._TokenSecret != value)) { - throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException(); + this.OnTokenSecretChanging(value); + this.SendPropertyChanging(); + this._TokenSecret = value; + this.SendPropertyChanged("TokenSecret"); + this.OnTokenSecretChanged(); } - this.OnConsumerIdChanging(value); - this.SendPropertyChanging(); - this._ConsumerId = value; - this.SendPropertyChanged("ConsumerId"); - this.OnConsumerIdChanged(); } } - } - - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UserId", DbType="Int")] - public System.Nullable<int> UserId - { - get - { - return this._UserId; - } - set + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_State", DbType="INT NOT NULL", CanBeNull=false)] + public OAuthServiceProvider.Code.TokenAuthorizationState State { - if ((this._UserId != value)) + get + { + return this._State; + } + set { - if (this._User.HasLoadedOrAssignedValue) + if ((this._State != value)) { - throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException(); + this.OnStateChanging(value); + this.SendPropertyChanging(); + this._State = value; + this.SendPropertyChanged("State"); + this.OnStateChanged(); } - this.OnUserIdChanging(value); - this.SendPropertyChanging(); - this._UserId = value; - this.SendPropertyChanged("UserId"); - this.OnUserIdChanged(); } } - } - - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Scope", DbType="nvarchar(MAX)", CanBeNull=false)] - public string Scope - { - get + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_IssueDate", DbType="DateTime NOT NULL")] + public System.DateTime IssueDate { - return this._Scope; - } - set - { - if ((this._Scope != value)) + get { - this.OnScopeChanging(value); - this.SendPropertyChanging(); - this._Scope = value; - this.SendPropertyChanged("Scope"); - this.OnScopeChanged(); + return this._IssueDate; } - } - } - - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_RequestTokenVerifier")] - public string RequestTokenVerifier - { - get - { - return this._RequestTokenVerifier; - } - set - { - if ((this._RequestTokenVerifier != value)) + set { - this.OnRequestTokenVerifierChanging(value); - this.SendPropertyChanging(); - this._RequestTokenVerifier = value; - this.SendPropertyChanged("RequestTokenVerifier"); - this.OnRequestTokenVerifierChanged(); + if ((this._IssueDate != value)) + { + this.OnIssueDateChanging(value); + this.SendPropertyChanging(); + this._IssueDate = value; + this.SendPropertyChanged("IssueDate"); + this.OnIssueDateChanged(); + } } } - } - - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_RequestTokenCallback")] - public string RequestTokenCallback - { - get - { - return this._RequestTokenCallback; - } - set + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ConsumerId", DbType="Int NOT NULL")] + public int ConsumerId { - if ((this._RequestTokenCallback != value)) + get { - this.OnRequestTokenCallbackChanging(value); - this.SendPropertyChanging(); - this._RequestTokenCallback = value; - this.SendPropertyChanged("RequestTokenCallback"); - this.OnRequestTokenCallbackChanged(); + return this._ConsumerId; } - } - } - - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ConsumerVersion")] - public string ConsumerVersion - { - get - { - return this._ConsumerVersion; - } - set - { - if ((this._ConsumerVersion != value)) + set { - this.OnConsumerVersionChanging(value); - this.SendPropertyChanging(); - this._ConsumerVersion = value; - this.SendPropertyChanged("ConsumerVersion"); - this.OnConsumerVersionChanged(); + if ((this._ConsumerId != value)) + { + if (this._OAuthConsumer.HasLoadedOrAssignedValue) + { + throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException(); + } + this.OnConsumerIdChanging(value); + this.SendPropertyChanging(); + this._ConsumerId = value; + this.SendPropertyChanged("ConsumerId"); + this.OnConsumerIdChanged(); + } } } - } - - [global::System.Data.Linq.Mapping.AssociationAttribute(Name="OAuthConsumer_OAuthToken", Storage="_OAuthConsumer", ThisKey="ConsumerId", OtherKey="ConsumerId", IsForeignKey=true, DeleteOnNull=true, DeleteRule="CASCADE")] - public OAuthConsumer OAuthConsumer - { - get + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UserId", DbType="Int")] + public System.Nullable<int> UserId { - return this._OAuthConsumer.Entity; - } - set - { - OAuthConsumer previousValue = this._OAuthConsumer.Entity; - if (((previousValue != value) - || (this._OAuthConsumer.HasLoadedOrAssignedValue == false))) + get + { + return this._UserId; + } + set { - this.SendPropertyChanging(); - if ((previousValue != null)) + if ((this._UserId != value)) { - this._OAuthConsumer.Entity = null; - previousValue.OAuthTokens.Remove(this); + if (this._User.HasLoadedOrAssignedValue) + { + throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException(); + } + this.OnUserIdChanging(value); + this.SendPropertyChanging(); + this._UserId = value; + this.SendPropertyChanged("UserId"); + this.OnUserIdChanged(); } - this._OAuthConsumer.Entity = value; - if ((value != null)) + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Scope", DbType="nvarchar(MAX)", CanBeNull=false)] + public string Scope + { + get + { + return this._Scope; + } + set + { + if ((this._Scope != value)) { - value.OAuthTokens.Add(this); - this._ConsumerId = value.ConsumerId; + this.OnScopeChanging(value); + this.SendPropertyChanging(); + this._Scope = value; + this.SendPropertyChanged("Scope"); + this.OnScopeChanged(); } - else + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_RequestTokenVerifier")] + public string RequestTokenVerifier + { + get + { + return this._RequestTokenVerifier; + } + set + { + if ((this._RequestTokenVerifier != value)) { - this._ConsumerId = default(int); + this.OnRequestTokenVerifierChanging(value); + this.SendPropertyChanging(); + this._RequestTokenVerifier = value; + this.SendPropertyChanged("RequestTokenVerifier"); + this.OnRequestTokenVerifierChanged(); } - this.SendPropertyChanged("OAuthConsumer"); } } - } - - [global::System.Data.Linq.Mapping.AssociationAttribute(Name="User_OAuthToken", Storage="_User", ThisKey="UserId", OtherKey="UserId", IsForeignKey=true, DeleteRule="CASCADE")] - public User User - { - get + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_RequestTokenCallback")] + public string RequestTokenCallback { - return this._User.Entity; + get + { + return this._RequestTokenCallback; + } + set + { + if ((this._RequestTokenCallback != value)) + { + this.OnRequestTokenCallbackChanging(value); + this.SendPropertyChanging(); + this._RequestTokenCallback = value; + this.SendPropertyChanged("RequestTokenCallback"); + this.OnRequestTokenCallbackChanged(); + } + } } - set + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ConsumerVersion")] + public string ConsumerVersion { - User previousValue = this._User.Entity; - if (((previousValue != value) - || (this._User.HasLoadedOrAssignedValue == false))) + get + { + return this._ConsumerVersion; + } + set { - this.SendPropertyChanging(); - if ((previousValue != null)) + if ((this._ConsumerVersion != value)) { - this._User.Entity = null; - previousValue.OAuthTokens.Remove(this); + this.OnConsumerVersionChanging(value); + this.SendPropertyChanging(); + this._ConsumerVersion = value; + this.SendPropertyChanged("ConsumerVersion"); + this.OnConsumerVersionChanged(); } - this._User.Entity = value; - if ((value != null)) + } + } + + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="OAuthConsumer_OAuthToken", Storage="_OAuthConsumer", ThisKey="ConsumerId", OtherKey="ConsumerId", IsForeignKey=true, DeleteOnNull=true, DeleteRule="CASCADE")] + public OAuthConsumer OAuthConsumer + { + get + { + return this._OAuthConsumer.Entity; + } + set + { + OAuthConsumer previousValue = this._OAuthConsumer.Entity; + if (((previousValue != value) + || (this._OAuthConsumer.HasLoadedOrAssignedValue == false))) { - value.OAuthTokens.Add(this); - this._UserId = value.UserId; + this.SendPropertyChanging(); + if ((previousValue != null)) + { + this._OAuthConsumer.Entity = null; + previousValue.OAuthTokens.Remove(this); + } + this._OAuthConsumer.Entity = value; + if ((value != null)) + { + value.OAuthTokens.Add(this); + this._ConsumerId = value.ConsumerId; + } + else + { + this._ConsumerId = default(int); + } + this.SendPropertyChanged("OAuthConsumer"); } - else + } + } + + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="User_OAuthToken", Storage="_User", ThisKey="UserId", OtherKey="UserId", IsForeignKey=true, DeleteRule="CASCADE")] + public User User + { + get + { + return this._User.Entity; + } + set + { + User previousValue = this._User.Entity; + if (((previousValue != value) + || (this._User.HasLoadedOrAssignedValue == false))) { - this._UserId = default(Nullable<int>); + this.SendPropertyChanging(); + if ((previousValue != null)) + { + this._User.Entity = null; + previousValue.OAuthTokens.Remove(this); + } + this._User.Entity = value; + if ((value != null)) + { + value.OAuthTokens.Add(this); + this._UserId = value.UserId; + } + else + { + this._UserId = default(Nullable<int>); + } + this.SendPropertyChanged("User"); } - this.SendPropertyChanged("User"); } } - } - - public event PropertyChangingEventHandler PropertyChanging; - - public event PropertyChangedEventHandler PropertyChanged; - - protected virtual void SendPropertyChanging() - { - if ((this.PropertyChanging != null)) + + public event PropertyChangingEventHandler PropertyChanging; + + public event PropertyChangedEventHandler PropertyChanged; + + protected virtual void SendPropertyChanging() { - this.PropertyChanging(this, emptyChangingEventArgs); + if ((this.PropertyChanging != null)) + { + this.PropertyChanging(this, emptyChangingEventArgs); + } } - } - - protected virtual void SendPropertyChanged(String propertyName) - { - if ((this.PropertyChanged != null)) + + protected virtual void SendPropertyChanged(String propertyName) { - this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName)); + if ((this.PropertyChanged != null)) + { + this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName)); + } } } -} - -[global::System.Data.Linq.Mapping.TableAttribute(Name="")] -public partial class Nonce : INotifyPropertyChanging, INotifyPropertyChanged -{ - - private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty); - - private string _Context; - - private string _Code; - - private System.DateTime _Timestamp; + [global::System.Data.Linq.Mapping.TableAttribute(Name="")] + public partial class Nonce : INotifyPropertyChanging, INotifyPropertyChanged + { + + private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty); + + private string _Context; + + private string _Code; + + private System.DateTime _Timestamp; + #region Extensibility Method Definitions partial void OnLoaded(); partial void OnValidate(System.Data.Linq.ChangeAction action); @@ -1099,89 +1100,90 @@ public partial class Nonce : INotifyPropertyChanging, INotifyPropertyChanged partial void OnTimestampChanging(System.DateTime value); partial void OnTimestampChanged(); #endregion - - public Nonce() - { - OnCreated(); - } - - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Context", CanBeNull=false, IsPrimaryKey=true)] - public string Context - { - get + + public Nonce() { - return this._Context; + OnCreated(); } - set + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Context", CanBeNull=false, IsPrimaryKey=true)] + public string Context { - if ((this._Context != value)) + get { - this.OnContextChanging(value); - this.SendPropertyChanging(); - this._Context = value; - this.SendPropertyChanged("Context"); - this.OnContextChanged(); + return this._Context; } - } - } - - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Code", CanBeNull=false, IsPrimaryKey=true)] - public string Code - { - get - { - return this._Code; - } - set - { - if ((this._Code != value)) + set { - this.OnCodeChanging(value); - this.SendPropertyChanging(); - this._Code = value; - this.SendPropertyChanged("Code"); - this.OnCodeChanged(); + if ((this._Context != value)) + { + this.OnContextChanging(value); + this.SendPropertyChanging(); + this._Context = value; + this.SendPropertyChanged("Context"); + this.OnContextChanged(); + } } } - } - - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Timestamp", IsPrimaryKey=true)] - public System.DateTime Timestamp - { - get + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Code", CanBeNull=false, IsPrimaryKey=true)] + public string Code { - return this._Timestamp; + get + { + return this._Code; + } + set + { + if ((this._Code != value)) + { + this.OnCodeChanging(value); + this.SendPropertyChanging(); + this._Code = value; + this.SendPropertyChanged("Code"); + this.OnCodeChanged(); + } + } } - set + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Timestamp", IsPrimaryKey=true)] + public System.DateTime Timestamp { - if ((this._Timestamp != value)) + get + { + return this._Timestamp; + } + set { - this.OnTimestampChanging(value); - this.SendPropertyChanging(); - this._Timestamp = value; - this.SendPropertyChanged("Timestamp"); - this.OnTimestampChanged(); + if ((this._Timestamp != value)) + { + this.OnTimestampChanging(value); + this.SendPropertyChanging(); + this._Timestamp = value; + this.SendPropertyChanged("Timestamp"); + this.OnTimestampChanged(); + } } } - } - - public event PropertyChangingEventHandler PropertyChanging; - - public event PropertyChangedEventHandler PropertyChanged; - - protected virtual void SendPropertyChanging() - { - if ((this.PropertyChanging != null)) + + public event PropertyChangingEventHandler PropertyChanging; + + public event PropertyChangedEventHandler PropertyChanged; + + protected virtual void SendPropertyChanging() { - this.PropertyChanging(this, emptyChangingEventArgs); + if ((this.PropertyChanging != null)) + { + this.PropertyChanging(this, emptyChangingEventArgs); + } } - } - - protected virtual void SendPropertyChanged(String propertyName) - { - if ((this.PropertyChanged != null)) + + protected virtual void SendPropertyChanged(String propertyName) { - this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName)); + if ((this.PropertyChanged != null)) + { + this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName)); + } } } } |