Example #1
0
                /// <summary>
                /// Builds a new <see cref="DOCDB_Users" /> object from a data record.
                /// </summary>
                /// <typeparam name="TRec">Type of the data record.</typeparam>
                /// <typeparam name="S">The type of the last parameter for <paramref name="setup" />.</typeparam>
                /// <param name="rec">The data record from where loading the data from.</param>
                /// <param name="setup">The optional setup action that is invoked after data have been loaded into that object.</param>
                /// <param name="setupStateFactory">The optional factory for last parameter of <paramref name="setup" />.</param>
                /// <exception cref="global::System.ArgumentNullException">
                /// <paramref name="rec" /> is <see langword="null" />.
                /// </exception>
                /// <returns>The created object.</returns>
                public static DOCDB_Users Build <TRec, S>(TRec rec, global::System.Action <DOCDB_Users, TRec, S> setup = null, global::System.Func <DOCDB_Users, TRec, S> setupStateFactory = null) where TRec : global::System.Data.IDataRecord
                {
                    if (rec == null)
                    {
                        throw new global::System.ArgumentNullException("rec");
                    }

                    var result = new DOCDB_Users();

                    result.LoadFrom <TRec, S>(rec: rec, setup: setup, setupStateFactory: setupStateFactory);

                    return(result);
                }
Example #2
0
 internal DocDBUserPrincipal(DocDBEntities.DOCDB_Users user, IIdentity id)
     : base(new SimpleAcl())
 {
     this._USER     = user;
     this._IDENTITY = id;
 }