public System.Threading.Tasks.Task <System.Collections.Generic.IList <Microsoft.AspNet.Identity.UserLoginInfo> > GetLoginsAsync(SoftFluent.Samples.AspNetIdentity2.User user)
        {
            System.Collections.Generic.IList <Microsoft.AspNet.Identity.UserLoginInfo> result = new System.Collections.Generic.List <Microsoft.AspNet.Identity.UserLoginInfo>();
            SoftFluent.Samples.AspNetIdentity2.LoginCollection userLogins = user.Logins;
            foreach (SoftFluent.Samples.AspNetIdentity2.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));
        }
Beispiel #2
0
        public virtual void CopyTo(SoftFluent.Samples.AspNetIdentity2.LoginCollection collection, bool deep)
        {
            if ((typeof(System.ICloneable).IsAssignableFrom(typeof(SoftFluent.Samples.AspNetIdentity2.Login)) == false))
            {
                deep = false;
            }
            System.Collections.Generic.IEnumerator <SoftFluent.Samples.AspNetIdentity2.Login> enumerator = this.GetEnumerator();
            bool b;

            for (b = enumerator.MoveNext(); b; b = enumerator.MoveNext())
            {
                if ((deep == true))
                {
                    collection.Add(((SoftFluent.Samples.AspNetIdentity2.Login)(((System.ICloneable)(enumerator.Current)).Clone())));
                }
                else
                {
                    collection.Add(enumerator.Current);
                }
            }
        }
Beispiel #3
0
 public static SoftFluent.Samples.AspNetIdentity2.LoginCollection PageLoadByUser(int pageIndex, int pageSize, CodeFluent.Runtime.PageOptions pageOptions, SoftFluent.Samples.AspNetIdentity2.User user)
 {
     if ((pageIndex < 0))
     {
         pageIndex = 0;
     }
     if ((pageSize < 0))
     {
         if ((pageOptions != null))
         {
             pageSize = pageOptions.DefaultPageSize;
         }
         else
         {
             pageSize = int.MaxValue;
         }
     }
     SoftFluent.Samples.AspNetIdentity2.LoginCollection ret = new SoftFluent.Samples.AspNetIdentity2.LoginCollection();
     System.Data.IDataReader reader = null;
     try
     {
         reader = SoftFluent.Samples.AspNetIdentity2.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.AspNetIdentity2.Constants.SoftFluent_Samples_AspNetIdentity2StoreName);
     }
     return(ret);
 }
Beispiel #4
0
 public static SoftFluent.Samples.AspNetIdentity2.LoginCollection LoadByUser(SoftFluent.Samples.AspNetIdentity2.User user)
 {
     SoftFluent.Samples.AspNetIdentity2.LoginCollection ret = SoftFluent.Samples.AspNetIdentity2.LoginCollection.PageLoadByUser(int.MinValue, int.MaxValue, null, user);
     return(ret);
 }
Beispiel #5
0
 public static SoftFluent.Samples.AspNetIdentity2.LoginCollection LoadAll()
 {
     SoftFluent.Samples.AspNetIdentity2.LoginCollection ret = SoftFluent.Samples.AspNetIdentity2.LoginCollection.PageLoadAll(int.MinValue, int.MaxValue, null);
     return(ret);
 }
Beispiel #6
0
 public virtual SoftFluent.Samples.AspNetIdentity2.LoginCollection Clone(bool deep)
 {
     SoftFluent.Samples.AspNetIdentity2.LoginCollection ret = new SoftFluent.Samples.AspNetIdentity2.LoginCollection();
     this.CopyTo(ret, deep);
     return(ret);
 }