public void Init()
        {
            IUsersStorageProviderV60 prov = GetProvider();

            prov.Init(MockHost(), connString, null);

            Assert.IsNotNull(prov.Information, "Information should not be null");
        }
예제 #2
0
        public void Init()
        {
            IUsersStorageProviderV60 prov = GetProvider();

            prov.Init(MockHost(), ConfigurationManager.AppSettings["AzureConnString"], "wiki1");

            Assert.IsNotNull(prov.Information, "Information should not be null");
        }
예제 #3
0
파일: UserInfo.cs 프로젝트: devio-at/duSSTW
 /// <summary>
 /// Initializes a new instance of the <b>UserInfo</b> class.
 /// </summary>
 /// <param name="username">The Username.</param>
 /// <param name="displayName">The display name.</param>
 /// <param name="email">The Email.</param>
 /// <param name="active">Specifies whether the Account is active or not.</param>
 /// <param name="dateTime">The creation DateTime.</param>
 /// <param name="provider">The Users Storage Provider that manages the User.</param>
 public UserInfo(string username, string displayName, string email, bool active, DateTime dateTime, IUsersStorageProviderV60 provider)
 {
     this.username    = username;
     this.displayName = displayName;
     this.email       = email;
     this.active      = active;
     this.dateTime    = dateTime;
     this.provider    = provider;
 }
예제 #4
0
 /// <summary>
 /// Verifies the read-only/read-write constraints of providers.
 /// </summary>
 /// <typeparam name="T">The type of the provider.</typeparam>
 /// <param name="provider">The provider.</param>
 /// <exception cref="T:ProviderConstraintException">Thrown when a constraint is not fulfilled.</exception>
 private static void VerifyConstraints <T>(T provider)
 {
     if (typeof(T) == typeof(IUsersStorageProviderV60))
     {
         // If the provider allows to write user accounts data, then group membership must be writeable too
         IUsersStorageProviderV60 actualInstance = (IUsersStorageProviderV60)provider;
         if (!actualInstance.UserAccountsReadOnly && actualInstance.GroupMembershipReadOnly)
         {
             throw new ProviderConstraintException("If UserAccountsReadOnly is false, then also GroupMembershipReadOnly must be false");
         }
     }
 }
예제 #5
0
 /// <summary>
 /// Initializes a new instance of the <see cref="T:UserGroup" /> class.
 /// </summary>
 /// <param name="name">The name of the group.</param>
 /// <param name="description">The description of the group.</param>
 /// <param name="provider">The Users Storage Provider that handles the user group.</param>
 public UserGroup(string name, string description, IUsersStorageProviderV60 provider)
 {
     this.name        = name;
     this.description = description;
     this.provider    = provider;
 }