public void Initialize(ServerContext context, Type bootstrapper, string[] args) {
			try {
				this.Connection.Initialize(bootstrapper, context, args);
			} catch (Exception ex) {
				Logger.Error(ex, "Failed to initialize host process");
			}
		}
Beispiel #2
0
		/// <summary>
		/// Creates the <see cref="Contract.IBootstrapper"/> instance.
		/// </summary>
		public void Initialize(ServerContext context, Contract.Type bootstrapperType, string[] args) {
			Logger.Initialize("log4net.config");
			Logger.Info(this, "Initializing " + bootstrapperType.FullName + "...");
			this._bootstrapper = ReflectionHelper.CreateInstance<IBootstrapper>(AppDomain.CurrentDomain, bootstrapperType);
			this._bootstrapper.Initialize(context, args);
			Logger.Info(this, "Initialized " + bootstrapperType.FullName);
		}
		public override void Run(ServerContext context) {
			Logger.Info(this, "Updating...");
			string configFilePath = context.ConfigFilePath;
			string transformationFilePath = Path.Combine(context.CurrentPath, "add_user_sex.xdt");
			FileTransformer transformer = new FileTransformer(configFilePath, configFilePath, transformationFilePath);
			transformer.Run();
			Logger.Info(this, "Done");
		}
		public void Initialize(ServerContext context, string[] args) {
			Logger.Initialize("log4net.config");
			this._context = context;
			Logger.Info(this, "Initialized in app domain " + AppDomain.CurrentDomain.FriendlyName + ", my version is " + this.GetType().Assembly.GetName().Version);
			Logger.Info(this, "args = { " + (args != null ? args.Print(", ") : "") + "}");
			if (args != null && args.Any()) {
				BriljantState state = Serializer.Deserialize<BriljantState>(args[0]);
				Logger.Info(this, "Briljant version = " + state.Version + ", path = " + state.Path);
			}
		}
		public void Initialize(ServerContext context, string[] args) {
			Logger.Initialize("log4net.config");
			this._context = context;
			Logger.Info(this, "Initialized in app domain " + AppDomain.CurrentDomain.FriendlyName + ", my version is " + this.GetType().Assembly.GetName().Version);
			Logger.Info(this, "args = { " + (args != null ? args.Print(", ") : "") + "}");
		}
Beispiel #6
0
		internal void Init(ServerContext context) {
			this._context = context;
		}
Beispiel #7
0
		public void Initialize(Contract.Type bootstrapper, ServerContext context, string[] args) {
			Logger.Info("Initializing bootstrapper " + bootstrapper.AssemblyQualifiedName + "...");
			this._bootstrapper = this.CreateInstance(bootstrapper.AssemblyQualifiedName);
			SymbolExtensions.GetMethodInfo<IBootstrapper>(b => b.Initialize(null, null)).Invoke(this._bootstrapper, new object[] {context, args});
			Logger.Info("Initialized");
		}
Beispiel #8
0
		public abstract void Run(ServerContext context);
		public override void Run(ServerContext context) {
			throw new System.NotImplementedException();
		}
		public void Initialize(ServerContext context, string[] args) {
			throw new System.NotImplementedException();
		}
		public void Initialize(ServerContext context, Type bootstrapper, string[] args) {
			this._runner.Initialize(context, bootstrapper, args);
		}