Esempio n. 1
0
 public virtual void ValidateLocal(System.Globalization.CultureInfo culture, System.Collections.Generic.IList <CodeFluent.Runtime.CodeFluentValidationException> results)
 {
     CodeFluent.Runtime.ServiceModel.CodeFluentEntityActionEventArgs evt = new CodeFluent.Runtime.ServiceModel.CodeFluentEntityActionEventArgs(this, CodeFluent.Runtime.CodeFluentEntityAction.Validating, true, results);
     evt.Culture = culture;
     this.OnEntityAction(evt);
     if ((evt.Cancel == true))
     {
         string externalValidate;
         if ((evt.Argument != null))
         {
             externalValidate = evt.Argument.ToString();
         }
         else
         {
             externalValidate = SoftFluent.Samples.SignalR.Proxy.Resources.Manager.GetStringWithDefault(culture, "SoftFluent.Samples.SignalR.Proxy.Customer.ExternalValidate", "Type \'SoftFluent.Samples.SignalR.Customer\' cannot be validated.", null);
         }
         CodeFluentPersistence.AddValidationError(results, externalValidate);
     }
     CodeFluentPersistence.ValidateMember(culture, results, this, null);
     if ((this.Id.Equals(CodeFluentPersistence.DefaultGuidValue) == true))
     {
         string localValidate = SoftFluent.Samples.SignalR.Proxy.Resources.Manager.GetStringWithDefault(culture, "SoftFluent.Samples.SignalR.Proxy.Customer.Id.NullException", "\'Id\' property cannot be set to \'00000000-0000-0000-0000-000000000000\' for type \'S" +
                                                                                                        "oftFluent.Samples.SignalR.Customer\'", null);
         CodeFluentPersistence.AddValidationError(results, localValidate);
     }
     this.OnEntityAction(new CodeFluent.Runtime.ServiceModel.CodeFluentEntityActionEventArgs(this, CodeFluent.Runtime.CodeFluentEntityAction.Validated, false, results));
 }
Esempio n. 2
0
 public virtual void Validate(System.Globalization.CultureInfo culture, System.Collections.Generic.IList <CodeFluent.Runtime.CodeFluentValidationException> results)
 {
     CodeFluent.Runtime.CodeFluentEntityActionEventArgs evt = new CodeFluent.Runtime.CodeFluentEntityActionEventArgs(this, CodeFluent.Runtime.CodeFluentEntityAction.Validating, true, results);
     evt.Culture = culture;
     this.OnEntityAction(evt);
     if ((evt.Cancel == true))
     {
         string externalValidate;
         if ((evt.Argument != null))
         {
             externalValidate = evt.Argument.ToString();
         }
         else
         {
             externalValidate = SoftFluent.Json.NET.Resources.Manager.GetStringWithDefault(culture, "SoftFluent.Json.NET.Support.ExternalValidate", "Type \'SoftFluent.Json.NET.Support\' cannot be validated.", null);
         }
         CodeFluentPersistence.AddValidationError(results, externalValidate);
     }
     CodeFluentPersistence.ValidateMember(culture, results, this, null);
     if ((this.Name == default(string)))
     {
         string localValidate = SoftFluent.Json.NET.Resources.Manager.GetStringWithDefault(culture, "SoftFluent.Json.NET.Support.Name.NullException", "\'Name\' property cannot be set to \'\' for type \'SoftFluent.Json.NET.Support\'", null);
         CodeFluentPersistence.AddValidationError(results, localValidate);
     }
     this.OnEntityAction(new CodeFluent.Runtime.CodeFluentEntityActionEventArgs(this, CodeFluent.Runtime.CodeFluentEntityAction.Validated, false, results));
 }
Esempio n. 3
0
 public virtual void Validate(System.Globalization.CultureInfo culture, System.Collections.Generic.IList <CodeFluent.Runtime.CodeFluentValidationException> results)
 {
     CodeFluent.Runtime.CodeFluentEntityActionEventArgs evt = new CodeFluent.Runtime.CodeFluentEntityActionEventArgs(this, CodeFluent.Runtime.CodeFluentEntityAction.Validating, true, results);
     evt.Culture = culture;
     this.OnEntityAction(evt);
     if ((evt.Cancel == true))
     {
         string externalValidate;
         if ((evt.Argument != null))
         {
             externalValidate = evt.Argument.ToString();
         }
         else
         {
             externalValidate = SoftFluent.Samples.AspNetIdentity1.Resources.Manager.GetStringWithDefault(culture, "SoftFluent.Samples.AspNetIdentity1.ExternalLogin.ExternalValidate", "Type \'SoftFluent.Samples.AspNetIdentity1.ExternalLogin\' cannot be validated.", null);
         }
         CodeFluentPersistence.AddValidationError(results, externalValidate);
     }
     CodeFluentPersistence.ValidateMember(culture, results, this, null);
     if ((this.ProviderKey == default(string)))
     {
         string localValidate = SoftFluent.Samples.AspNetIdentity1.Resources.Manager.GetStringWithDefault(culture, "SoftFluent.Samples.AspNetIdentity1.ExternalLogin.ProviderKey.NullException", "\'ProviderKey\' property cannot be set to \'\' for type \'SoftFluent.Samples.AspNetIde" +
                                                                                                          "ntity1.ExternalLogin\'", null);
         CodeFluentPersistence.AddValidationError(results, localValidate);
     }
     if ((this.User == null))
     {
         string localValidate1 = SoftFluent.Samples.AspNetIdentity1.Resources.Manager.GetStringWithDefault(culture, "SoftFluent.Samples.AspNetIdentity1.ExternalLogin.User.NullException", "\'User\' property cannot be set to \'\' for type \'SoftFluent.Samples.AspNetIdentity1." +
                                                                                                           "ExternalLogin\'", null);
         CodeFluentPersistence.AddValidationError(results, localValidate1);
     }
     this.OnEntityAction(new CodeFluent.Runtime.CodeFluentEntityActionEventArgs(this, CodeFluent.Runtime.CodeFluentEntityAction.Validated, false, results));
 }
Esempio n. 4
0
 public virtual void Validate(System.Globalization.CultureInfo culture, System.Collections.Generic.IList <CodeFluent.Runtime.CodeFluentValidationException> results)
 {
     CodeFluent.Runtime.CodeFluentEntityActionEventArgs evt = new CodeFluent.Runtime.CodeFluentEntityActionEventArgs(this, CodeFluent.Runtime.CodeFluentEntityAction.Validating, true, results);
     evt.Culture = culture;
     this.OnEntityAction(evt);
     if ((evt.Cancel == true))
     {
         string externalValidate;
         if ((evt.Argument != null))
         {
             externalValidate = evt.Argument.ToString();
         }
         else
         {
             externalValidate = ModelCodeFluent.Resources.Manager.GetStringWithDefault(culture, "ModelCodeFluent.Identity.UserLogin.ExternalValidate", "Type \'ModelCodeFluent.Identity.UserLogin\' cannot be validated.", null);
         }
         CodeFluentPersistence.AddValidationError(results, externalValidate);
     }
     CodeFluentPersistence.ValidateMember(culture, results, this, null);
     if ((this.Id.Equals(CodeFluentPersistence.DefaultGuidValue) == true))
     {
         string localValidate = ModelCodeFluent.Resources.Manager.GetStringWithDefault(culture, "ModelCodeFluent.Identity.UserLogin.Id.NullException", "\'Id\' property cannot be set to \'00000000-0000-0000-0000-000000000000\' for type \'M" +
                                                                                       "odelCodeFluent.Identity.UserLogin\'", null);
         CodeFluentPersistence.AddValidationError(results, localValidate);
     }
     if ((this.ProviderName == default(string)))
     {
         string localValidate1 = ModelCodeFluent.Resources.Manager.GetStringWithDefault(culture, "ModelCodeFluent.Identity.UserLogin.ProviderName.NullException", "\'ProviderName\' property cannot be set to \'\' for type \'ModelCodeFluent.Identity.Us" +
                                                                                        "erLogin\'", null);
         CodeFluentPersistence.AddValidationError(results, localValidate1);
     }
     if ((this.ProviderKey == default(string)))
     {
         string localValidate2 = ModelCodeFluent.Resources.Manager.GetStringWithDefault(culture, "ModelCodeFluent.Identity.UserLogin.ProviderKey.NullException", "\'ProviderKey\' property cannot be set to \'\' for type \'ModelCodeFluent.Identity.Use" +
                                                                                        "rLogin\'", null);
         CodeFluentPersistence.AddValidationError(results, localValidate2);
     }
     if ((this.ProviderDisplayName == default(string)))
     {
         string localValidate3 = ModelCodeFluent.Resources.Manager.GetStringWithDefault(culture, "ModelCodeFluent.Identity.UserLogin.ProviderDisplayName.NullException", "\'ProviderDisplayName\' property cannot be set to \'\' for type \'ModelCodeFluent.Iden" +
                                                                                        "tity.UserLogin\'", null);
         CodeFluentPersistence.AddValidationError(results, localValidate3);
     }
     if ((this.User == null))
     {
         string localValidate4 = ModelCodeFluent.Resources.Manager.GetStringWithDefault(culture, "ModelCodeFluent.Identity.UserLogin.User.NullException", "\'User\' property cannot be set to \'\' for type \'ModelCodeFluent.Identity.UserLogin\'" +
                                                                                        "", null);
         CodeFluentPersistence.AddValidationError(results, localValidate4);
     }
     this.OnEntityAction(new CodeFluent.Runtime.CodeFluentEntityActionEventArgs(this, CodeFluent.Runtime.CodeFluentEntityAction.Validated, false, results));
 }
 public virtual void ValidateLocal(System.Globalization.CultureInfo culture, System.Collections.Generic.IList <CodeFluent.Runtime.CodeFluentValidationException> results)
 {
     CodeFluent.Runtime.ServiceModel.CodeFluentEntityActionEventArgs evt = new CodeFluent.Runtime.ServiceModel.CodeFluentEntityActionEventArgs(this, CodeFluent.Runtime.CodeFluentEntityAction.Validating, true, results);
     evt.Culture = culture;
     this.OnEntityAction(evt);
     if ((evt.Cancel == true))
     {
         string externalValidate;
         if ((evt.Argument != null))
         {
             externalValidate = evt.Argument.ToString();
         }
         else
         {
             externalValidate = ContactManager.Proxy.Resources.Manager.GetStringWithDefault(culture, "ContactManager.Proxy.ContactSource.ExternalValidate", "Type \'ContactManager.ContactSource\' cannot be validated.", null);
         }
         CodeFluentPersistence.AddValidationError(results, externalValidate);
     }
     CodeFluentPersistence.ValidateMember(culture, results, this, null);
     this.OnEntityAction(new CodeFluent.Runtime.ServiceModel.CodeFluentEntityActionEventArgs(this, CodeFluent.Runtime.CodeFluentEntityAction.Validated, false, results));
 }
Esempio n. 6
0
 public virtual void Validate(System.Globalization.CultureInfo culture, System.Collections.Generic.IList <CodeFluent.Runtime.CodeFluentValidationException> results)
 {
     CodeFluent.Runtime.CodeFluentEntityActionEventArgs evt = new CodeFluent.Runtime.CodeFluentEntityActionEventArgs(this, CodeFluent.Runtime.CodeFluentEntityAction.Validating, true, results);
     evt.Culture = culture;
     this.OnEntityAction(evt);
     if ((evt.Cancel == true))
     {
         string externalValidate;
         if ((evt.Argument != null))
         {
             externalValidate = evt.Argument.ToString();
         }
         else
         {
             externalValidate = SoftFluent.Samples.Thinktecture.IdentityServer.Resources.Manager.GetStringWithDefault(culture, "SoftFluent.Samples.Thinktecture.IdentityServer.UserClaim.ExternalValidate", "Type \'SoftFluent.Samples.Thinktecture.IdentityServer.UserClaim\' cannot be validat" +
                                                                                                                      "ed.", null);
         }
         CodeFluentPersistence.AddValidationError(results, externalValidate);
     }
     CodeFluentPersistence.ValidateMember(culture, results, this, null);
     if ((this.Id.Equals(CodeFluentPersistence.DefaultGuidValue) == true))
     {
         string localValidate = SoftFluent.Samples.Thinktecture.IdentityServer.Resources.Manager.GetStringWithDefault(culture, "SoftFluent.Samples.Thinktecture.IdentityServer.UserClaim.Id.NullException", "\'Id\' property cannot be set to \'00000000-0000-0000-0000-000000000000\' for type \'S" +
                                                                                                                      "oftFluent.Samples.Thinktecture.IdentityServer.UserClaim\'", null);
         CodeFluentPersistence.AddValidationError(results, localValidate);
     }
     if ((this.Type == default(string)))
     {
         string localValidate1 = SoftFluent.Samples.Thinktecture.IdentityServer.Resources.Manager.GetStringWithDefault(culture, "SoftFluent.Samples.Thinktecture.IdentityServer.UserClaim.Type.NullException", "\'Type\' property cannot be set to \'\' for type \'SoftFluent.Samples.Thinktecture.Ide" +
                                                                                                                       "ntityServer.UserClaim\'", null);
         CodeFluentPersistence.AddValidationError(results, localValidate1);
     }
     if ((this.User == null))
     {
         string localValidate2 = SoftFluent.Samples.Thinktecture.IdentityServer.Resources.Manager.GetStringWithDefault(culture, "SoftFluent.Samples.Thinktecture.IdentityServer.UserClaim.User.NullException", "\'User\' property cannot be set to \'\' for type \'SoftFluent.Samples.Thinktecture.Ide" +
                                                                                                                       "ntityServer.UserClaim\'", null);
         CodeFluentPersistence.AddValidationError(results, localValidate2);
     }
     this.OnEntityAction(new CodeFluent.Runtime.CodeFluentEntityActionEventArgs(this, CodeFluent.Runtime.CodeFluentEntityAction.Validated, false, results));
 }