/// <summary>
                /// Builds a new <see cref="REMCOMM_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 REMCOMM_Users Build <TRec, S>(TRec rec, global::System.Action <REMCOMM_Users, TRec, S> setup = null, global::System.Func <REMCOMM_Users, TRec, S> setupStateFactory = null) where TRec : global::System.Data.IDataRecord
                {
                    if (rec == null)
                    {
                        throw new global::System.ArgumentNullException("rec");
                    }

                    var result = new REMCOMM_Users();

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

                    return(result);
                }
Ejemplo n.º 2
0
 internal RemoteCommUserPrincipal(RemoteCommEntities.REMCOMM_Users user, IIdentity id)
     : base(new SimpleAcl())
 {
     this._USER     = user;
     this._IDENTITY = id;
 }