///<summary> /// Setup NHibernate to include Rhino Security configuration ///</summary> public static void Configure <TUserType>(Configuration cfg, SecurityTableStructure securityTableStructure) where TUserType : IUser { cfg.AddAssembly(typeof(IUser).Assembly); new SchemaChanger(cfg, securityTableStructure).Change(); new UserMapper(cfg, typeof(TUserType)).Map(); }
///<summary> /// Setup NHibernate to include Rhino Security configuration ///</summary> /// <param name="cfg">todo: describe cfg parameter on Configure</param> /// <param name="securityTableStructure">todo: describe securityTableStructure parameter on Configure</param> public static void Configure <TUserType>(Configuration cfg, SecurityTableStructure securityTableStructure) where TUserType : IUser { cfg.AddAssembly(typeof(IUser).Assembly); new SchemaChanger(cfg, securityTableStructure).Change(); new UserMapper(cfg, typeof(TUserType)).Map(); cfg.SetListener(ListenerType.PreDelete, new DeleteEntityEventListener()); }
/// <summary> /// Initializes a new instance of the <see cref="SchemaChanger"/> class. /// </summary> /// <param name="cfg">The NHibernte configuration.</param> /// <param name="tableStructure">The table structure.</param> public SchemaChanger(Configuration cfg, SecurityTableStructure tableStructure) { this.cfg = cfg; this.tableStructure = tableStructure; }
/// <summary> /// Initializes a new instance of the <see cref="RhinoSecurityFacility"/> class. /// </summary> /// <param name="securityTableStructure">The security table structure.</param> /// <param name="userType">Type of the user.</param> public RhinoSecurityFacility(SecurityTableStructure securityTableStructure, Type userType) { this.securityTableStructure = securityTableStructure; this.userType = userType; }
/// <summary> /// Initializes a new instance of the <see cref="NHibernateMappingModifier"/> class. /// </summary> /// <param name="structure">The structure.</param> /// <param name="userType">Name of the user entity.</param> public NHibernateMappingModifier(SecurityTableStructure structure, Type userType) { securityTableStructure = structure; this.userType = userType; }