Exemple #1
0
        public virtual void CopyTo(SoftFluent.Samples.Thinktecture.IdentityServer.LoginCollection collection, bool deep)
        {
            if ((typeof(System.ICloneable).IsAssignableFrom(typeof(SoftFluent.Samples.Thinktecture.IdentityServer.Login)) == false))
            {
                deep = false;
            }
            System.Collections.Generic.IEnumerator <SoftFluent.Samples.Thinktecture.IdentityServer.Login> enumerator = this.GetEnumerator();
            bool b;

            for (b = enumerator.MoveNext(); b; b = enumerator.MoveNext())
            {
                if ((deep == true))
                {
                    collection.Add(((SoftFluent.Samples.Thinktecture.IdentityServer.Login)(((System.ICloneable)(enumerator.Current)).Clone())));
                }
                else
                {
                    collection.Add(enumerator.Current);
                }
            }
        }
Exemple #2
0
 public static SoftFluent.Samples.Thinktecture.IdentityServer.LoginCollection PageLoadByUser(int pageIndex, int pageSize, CodeFluent.Runtime.PageOptions pageOptions, SoftFluent.Samples.Thinktecture.IdentityServer.User user)
 {
     if ((pageIndex < 0))
     {
         pageIndex = 0;
     }
     if ((pageSize < 0))
     {
         if ((pageOptions != null))
         {
             pageSize = pageOptions.DefaultPageSize;
         }
         else
         {
             pageSize = int.MaxValue;
         }
     }
     SoftFluent.Samples.Thinktecture.IdentityServer.LoginCollection ret = new SoftFluent.Samples.Thinktecture.IdentityServer.LoginCollection();
     System.Data.IDataReader reader = null;
     try
     {
         reader = SoftFluent.Samples.Thinktecture.IdentityServer.LoginCollection.PageDataLoadByUser(pageOptions, user);
         if ((reader == null))
         {
             return(ret);
         }
         ret.LoadByUser(pageIndex, pageSize, pageOptions, reader, user);
     }
     finally
     {
         if ((reader != null))
         {
             reader.Dispose();
         }
         CodeFluent.Runtime.CodeFluentPersistence.CompleteCommand(SoftFluent.Samples.Thinktecture.IdentityServer.Constants.SoftFluent_Samples_Thinktecture_IdentityServerStoreName);
     }
     return(ret);
 }
Exemple #3
0
 public static SoftFluent.Samples.Thinktecture.IdentityServer.LoginCollection LoadByUser(SoftFluent.Samples.Thinktecture.IdentityServer.User user)
 {
     SoftFluent.Samples.Thinktecture.IdentityServer.LoginCollection ret = SoftFluent.Samples.Thinktecture.IdentityServer.LoginCollection.PageLoadByUser(int.MinValue, int.MaxValue, null, user);
     return(ret);
 }
Exemple #4
0
 public static SoftFluent.Samples.Thinktecture.IdentityServer.LoginCollection LoadAll()
 {
     SoftFluent.Samples.Thinktecture.IdentityServer.LoginCollection ret = SoftFluent.Samples.Thinktecture.IdentityServer.LoginCollection.PageLoadAll(int.MinValue, int.MaxValue, null);
     return(ret);
 }
Exemple #5
0
 public virtual SoftFluent.Samples.Thinktecture.IdentityServer.LoginCollection Clone(bool deep)
 {
     SoftFluent.Samples.Thinktecture.IdentityServer.LoginCollection ret = new SoftFluent.Samples.Thinktecture.IdentityServer.LoginCollection();
     this.CopyTo(ret, deep);
     return(ret);
 }
Exemple #6
0
        public System.Threading.Tasks.Task <System.Collections.Generic.IList <Microsoft.AspNet.Identity.UserLoginInfo> > GetLoginsAsync(SoftFluent.Samples.Thinktecture.IdentityServer.User user)
        {
            System.Collections.Generic.IList <Microsoft.AspNet.Identity.UserLoginInfo> result     = new System.Collections.Generic.List <Microsoft.AspNet.Identity.UserLoginInfo>();
            SoftFluent.Samples.Thinktecture.IdentityServer.LoginCollection             userLogins = user.Logins;
            foreach (SoftFluent.Samples.Thinktecture.IdentityServer.Login userLogin in userLogins)
            {
                Microsoft.AspNet.Identity.UserLoginInfo userLoginInfo = new Microsoft.AspNet.Identity.UserLoginInfo(userLogin.ProviderName, userLogin.ProviderKey);

                result.Add(userLoginInfo);
            }

            return(System.Threading.Tasks.Task.FromResult(result));
        }