/// <summary> /// Initializes a new instance of the <see cref="LicenseScopeNode"/> class. /// </summary> /// <param name="configurator">The configurator.</param> public LicenseScopeNode(IConfigurator configurator) : base(true) { this.Configurator = configurator; // Init View Params and Tag this.DataElementType = DataElementType.License; this.DisplayName = SnapInResources.ScopeNodeDispayName_License; this.Tag = string.Empty; this.ImageIndex = 20; this.SelectedImageIndex = 20; // Init Right Panel // Create a message view for the root node. MmcListViewDescription lvd = new MmcListViewDescription(); lvd.DisplayName = SnapInResources.ScopeNodeDispayName_License; lvd.ViewType = typeof(LicenseListView); //lvd.Options = MmcListViewOptions.ExcludeScopeNodes; this.ViewDescriptions.Add(lvd); this.ViewDescriptions.DefaultIndex = 0; // Init Actions this.EnabledStandardVerbs = StandardVerbs.Refresh; }
/// <summary> /// Initializes a new instance of the <see cref="CompaniesScopeNode"/> class. /// </summary> public CompaniesScopeNode(IConfigurator configurator) { this.Configurator = configurator; // Init View Params and Tag this.DataElementType = DataElementType.Companies; this.DisplayName = SnapInResources.ScopeNodeDispayName_Companies; this.Tag = string.Empty; this.ImageIndex = 3; this.SelectedImageIndex = 3; // Init Right Panel // Create a message view for the root node. MmcListViewDescription lvd = new MmcListViewDescription(); lvd.DisplayName = SnapInResources.ScopeNodeDispayName_Companies; lvd.ViewType = typeof(CompanyListView); //lvd.Options = MmcListViewOptions.SingleSelect; this.ViewDescriptions.Add(lvd); this.ViewDescriptions.DefaultIndex = 0; // Init Actions this.EnabledStandardVerbs = StandardVerbs.Refresh; this.CreateNewCompany = new SyncAction(SnapInResources.CompaniesScopeNode_Action_Create_Name, SnapInResources.CompaniesScopeNode_Action_Create_Description, 8); this.CreateNewCompanyForDatabase = new SyncAction(SnapInResources.CompaniesScopeNode_Action_CreateForDatabase_Name, SnapInResources.CompaniesScopeNode_Action_CreateForDatabase_Description, 31); this.ActionsPaneItems.Add(this.CreateNewCompany); this.ActionsPaneItems.Add(this.CreateNewCompanyForDatabase); // Read Copmpanies From Config Refresh(); }
public void ReConfig(IConfigurator configurator) { if(IsRunning) ShutDown(); cfg = new ConfigurationFactory().Create(configurator); Start(); cfg.Configurator = null; }
/// <summary> /// Initializes a new instance of the <see cref="UpdateCheckForm"/> class. /// </summary> /// <param name="serverConfigurator">The server configurator.</param> public UpdateCheckForm(IConfigurator configurator) { InitializeComponent(); #if RADIUS this.Icon = SnapInResources.portal_RS; #endif this.Configurator = configurator; }
/// <summary> /// /// </summary> /// <param name="configurator">optional</param> /// <returns></returns> public IBurrowConfig Create(IConfigurator configurator) { IBurrowConfig retVal = GetConfigurationInstance(); if(configurator != null) retVal.Configurator = configurator; if (retVal.Configurator != null) retVal.Configurator.Config(retVal); return retVal; }
public void Add(IConfigurator configurator) { Guard.AgainstNull(configurator, "configurator"); if (Contains(configurator)) { throw new ESBConfigurationException(string.Format(ESBResources.ConfiguratorAlreadyRegisteredException, configurator.GetType().FullName)); } _configurators.Add(configurator); }
private static IMultiDatabaseCfg Config(IConfigurator configurator) { IMultiDatabaseCfg cfg = MultiDatabaseSection.CreateInstance(); if (configurator != null) cfg.Configurator = configurator; if (cfg.Configurator != null) cfg.Configurator.Config(cfg); return cfg; }
internal PersistenceUnit(IPersistenceUnitCfg cfg, IConfigurator configurator) { configuration = cfg; nHConfiguration = CreateNHConfiguration(); if(configurator != null) configurator.Config(cfg, nHConfiguration); if (cfg.AutoUpdateSchema) new SchemaUtil().UpdateSchema(false, true, nHConfiguration); ReBuildSessionfactory(); //Temporarily removed auditLog before we decided whether it should stay in Burrow //if (Configuration.EnableAuditLog) // interceptorFactory = AuditLogInterceptorFactory.Instance; }
/// <summary> /// Initializes a new instance of the <see cref="ChangeDomainForm"/> class. /// </summary> /// <param name="serverConfigurator">The server configurator.</param> /// <param name="companyId">The company id.</param> /// <param name="domainName">Name of the domain.</param> public DeleteCompanyForm(IConfigurator serverConfigurator, string companyId, string domainName) { InitializeComponent(); #if RADIUS this.Icon = SnapInResources.portal_RS; #endif this.Configurator = serverConfigurator; this.CompanyId = companyId; this.labelWarningMsg.Text = string.Format(SnapInResources.CompanyScopeNode_Action_Delete_WarningMessage, domainName); }
/// <summary> /// Initializes a new instance of the <see cref="UpdateCompanyForm"/> class. /// </summary> /// <param name="serverConfigurator">The server configurator.</param> public UpdateCompanyForm(IConfigurator configurator, ICompanyInfo companyInfo) { InitializeComponent(); #if RADIUS this.Icon = SnapInResources.portal_RS; #endif this.Configurator = configurator; this.CompanyInfo = companyInfo; InitializePage1(); }
public Duplicator(string sourceDirectory, string targetDirectory, IConfigurator config) { if (string.IsNullOrWhiteSpace(sourceDirectory)) throw new ArgumentNullException("sourceDirectory"); if (string.IsNullOrWhiteSpace(targetDirectory)) throw new ArgumentNullException("targetDirectory"); if (!Directory.Exists(sourceDirectory)) throw new DirectoryNotFoundException(); if (!Directory.Exists(targetDirectory)) throw new DirectoryNotFoundException(); if (sourceDirectory == targetDirectory) throw new ArgumentException("Cannot duplicate the source directory to itself"); _handlerFactory = new DuplicationHandlerFactory(sourceDirectory, targetDirectory); _observable = new FileSystemObservable(sourceDirectory); _subscription = config.Configure(_observable).Subscribe(OnFileSystemChange); }
/// <summary> /// Initializes a new instance of the <see cref="EditPortalPoolForm"/> class. /// </summary> /// <param name="serverConfigurator">The server configurator.</param> public EditPortalPoolForm(IConfigurator serverConfigurator, string currentPool) { InitializeComponent(); #if RADIUS this.Icon = SnapInResources.portal_RS; #endif this.CurrentPool = currentPool; this.Configurator = serverConfigurator; // Read SQL Server Settings Here InitializeIisBlock(); }
/// <summary> /// Initializes a new instance of the <see cref="CreateAspForm"/> class. /// </summary> /// <param name="serverConfigurator">The server configurator.</param> public CreateAspForm(IConfigurator configurator) { InitializeComponent(); #if RADIUS this.Icon = SnapInResources.portal_RS; #endif this.Configurator = configurator; this.ValidBackColor = Color.FromKnownColor(System.Drawing.KnownColor.Window); this.InvalidBackColor = Color.FromArgb(255, 192, 192); InitalizeAspBlock(); }
/// <summary> /// Initializes a new instance of the <see cref="ServerScopeNode"/> class. /// </summary> public ServerScopeNode(IConfigurator configurator) { this.EnabledStandardVerbs = StandardVerbs.Refresh; this.Configurator = configurator; // Initialize View ViewDescriptions // Create a form view for the root node. FormViewDescription fvd = new FormViewDescription(); fvd.DisplayName = "(localhost) Home"; fvd.ViewType = typeof(ServerFormView); fvd.ControlType = typeof(ServerFeaturesControl); // Attach the view to the root node. this.ViewDescriptions.Add(fvd); this.ViewDescriptions.DefaultIndex = 0; }
/// <summary> /// Initializes a new instance of the <see cref="UpdateCompanyListForm"/> class. /// </summary> /// <param name="serverConfigurator">The server configurator.</param> public UpdateCompanyListForm(IConfigurator configurator, CompanyScopeNode[] companies) { InitializeComponent(); #if RADIUS this.Icon = SnapInResources.portal_RS; #endif this.Configurator = configurator; this.Companies = companies; this.CancelUpdate = false; this.FailedCompanies = new List<CompanyScopeNode>(); this.FailedCompaniesLogs = new List<string>(); InitializePage1(); }
internal Database(IDatabaseCfg cfg, IConfigurator configurator) { try { configuration = cfg; nHConfiguration = CreateNHConfiguration(); if (configurator != null) configurator.Config(cfg, nHConfiguration); ReBuildSessionfactory(); } catch (Exception ex) { logger.Error(string.Format("初始化数据库{0}出错", cfg.Name), ex); throw ex; } }
/// <summary> /// Initializes a new instance of the <see cref="EditAspSettingsForm"/> class. /// </summary> /// <param name="serverConfigurator">The server configurator.</param> public EditAspSettingsForm(IConfigurator serverConfigurator) { InitializeComponent(); #if RADIUS this.Icon = SnapInResources.portal_RS; #endif this.Configurator = serverConfigurator; //this.EnableForeColor = Color.FromKnownColor(System.Drawing.KnownColor.ControlText); //this.DisableForeColor = Color.FromKnownColor(System.Drawing.KnownColor.InactiveCaptionText); this.ValidBackColor = Color.FromKnownColor(System.Drawing.KnownColor.Window); this.InvalidBackColor = Color.FromArgb(255, 192, 192); // Read SQL Server Settings Here InitAspAddressBlock(); InitIISPoolBlock(); }
/// <summary> /// Initializes a new instance of the <see cref="ChangeDomainForm"/> class. /// </summary> /// <param name="configurator">The configurator.</param> public EditDefaultAddressForm(IConfigurator serverConfigurator, string companyId) { InitializeComponent(); #if RADIUS this.Icon = SnapInResources.portal_RS; #endif this.Configurator = serverConfigurator; this.CompanyId = companyId; this.ValidBackColor = Color.FromKnownColor(System.Drawing.KnownColor.Window); this.InvalidBackColor = Color.FromArgb(255, 192, 192); ICompanyInfo companyInfo = this.Configurator.GetCompanyInfo(companyId); comboBoxSchema.SelectedIndex = companyInfo.Scheme == "https" ? 1 : 0; textHostName.Text = companyInfo.Host; textBoxIisPort.Text = companyInfo.Port; }
/// <summary> /// Initializes a new instance of the <see cref="UpgradesScopeNode"/> class. /// </summary> public UpgradesScopeNode(IConfigurator configurator) { this.Configurator = configurator; this.DataElementType = DataElementType.Upgrades; this.DisplayName = SnapInResources.ScopeNodeDispayName_Upgrades; this.DataElementType = DataElementType.Upgrades; this.Tag = string.Empty; this.ImageIndex = 6; this.SelectedImageIndex = 6; this.UpdateCheckAction = new SyncAction(SnapInResources.UpgradesScopeNode_Action_UpdateCheck_Name, SnapInResources.UpgradesScopeNode_Action_UpdateCheck_Description, 6); #if RADIUS this.UpdateCheckAction.Enabled = false; this.UpdateCheckAction.ImageIndex = 30; #endif this.ActionsPaneItems.Add(this.UpdateCheckAction); }
public MiscSettingConfigurator(IConfigurator<RegularConfigSource> context, string key, string value) :base(context) { this.key = key; this.value = value; }
protected ConfORMConfigBuilder(IConfigurator configurator, IEnumerable<string> assemblies, string databaseSchema) { _configurator = configurator; _assemblies = assemblies; _databaseSchema = databaseSchema; }
public static ICascadingConfigurator Load(IConfigurator configurator) { return(current.Load(configurator)); }
public ApplicationConfigurator(IConfigurator<RegularConfigSource> context, Type type) : base(context, type) { }
public ResourceManagerConfigurator(IConfigurator<RegularConfigSource> context, Type type, string name) : base(context) { this.resourceType = type; this.resourceName = name; }
public static void Configure(IConfigurator configurator) { configurator.Configure(instance); }
public ObjectContainerConfigurator(IConfigurator<RegularConfigSource> context, Type type, bool initFromConfigFile, string sectionName) : base(context, type) { this.initFromConfigFile = initFromConfigFile; this.sectionName = sectionName; }
public LoggerConfigurator(IConfigurator context) : base(context) { }
/// <summary> /// Gets the upgrades name list. /// </summary> /// <param name="serverConfigurator">The server configurator.</param> /// <returns></returns> private int[] GetUpgradeElements(IConfigurator serverConfigurator) { return serverConfigurator.ListUpdates(); }
private bool TryGetConfigurator(BooleanGenericTuple <ImageModPathTuple> selectedMod, out IConfigurator configurator, out PluginLoader loader) { var config = selectedMod.Generic.ModConfig; string dllPath = config.GetManagedDllPath(selectedMod.Generic.ModConfigPath); configurator = null; loader = null; if (!File.Exists(dllPath)) { return(false); } loader = PluginLoader.CreateFromAssemblyFile(dllPath, true, _sharedTypes, config => config.DefaultContext = AssemblyLoadContext.GetLoadContext(Assembly.GetExecutingAssembly())); var assembly = loader.LoadDefaultAssembly(); var types = assembly.GetTypes(); var entryPoint = types.FirstOrDefault(t => typeof(IConfigurator).IsAssignableFrom(t) && !t.IsAbstract); if (entryPoint != null) { configurator = (IConfigurator)Activator.CreateInstance(entryPoint); configurator.SetModDirectory(Path.GetFullPath(Path.GetDirectoryName(selectedMod.Generic.ModConfigPath))); return(true); } return(false); }
public AppPluginConfigurator(IConfigurator<RegularConfigSource> context, Type type, string name) : base(context) { this.type = type; this.name = name; }
protected void RemoveConfigurator(IConfigurator configurator) { Configurators.Remove(configurator); }
/// <summary> /// Configures Caliburn with the specified <see cref="IServiceLocator"/> and configurator <see cref="IConfigurator"/>. /// </summary> /// <param name="serviceLocator">The serviceLocator.</param> /// <param name="configurator">The configurator.</param> /// <returns></returns> public static CoreConfiguration ConfigureCore(IServiceLocator serviceLocator, IConfigurator configurator) { return ConfigureCore(serviceLocator, configurator.ConfigureWith); }
public void ConfigureAll(IConfigurator config) => _components.ForEach(ca => ca.Configure(config));