Esempio n. 1
0
		public RemoteLoader()
		{
			Log=(ApplicationLog) AppDomain.CurrentDomain.GetData("AppLog");
			Context.RegisterDynamicProperty(
				new RemoteServerDynamicProperty(AppDomain.CurrentDomain.FriendlyName,Log),null,null);
			LoadedTypes=new ArrayList();
		}
Esempio n. 2
0
 public RemoteServerDynamicMessageSink(string AppName, ApplicationLog Log)
 {
     _AppName = AppName;
     _Log     = Log;
 }
Esempio n. 3
0
 /// <summary>
 /// NKRemoteServerDynamicProperty constructor.
 /// </summary>
 public RemoteServerDynamicProperty(string appName, ApplicationLog log)
 {
     _Name = appName;
     _Log  = log;
 }
Esempio n. 4
0
 public ApplicationBase(string AppName, string BaseDir, ApplicationServer server):base()
 {
   _Name=AppName;
   _BaseDirectory=BaseDir;
   AppServer=server;
   SecurityManager=server.SecurityManager;        
   log = new ApplicationLog(_BaseDirectory + AppName + ".app.log");
   log.WriteLine("System","Application Started");
   _LogCategory.Name = _Name;
   EnterMethod();
   try
   {
     SendValue("Application Name", AppName);
     SendValue("Base Directory", BaseDir);
     SendValue("Log file", _BaseDirectory + AppName + ".app.log");
     SendString("App Started");      
   }
   catch(Exception E)
   {
     SendError(E);
     throw;
   }
   finally
   {
     ExitMethod();
   }
 }
Esempio n. 5
0
 public virtual void Configure(ApplicationServer server, DirectoryInfo BaseDir, XmlDocument ConfigFile)
 {
   if (Boolean.Parse(ReadAppSetting(ConfigFile, "Debug", "false")))
   {
     TerWoord.Diagnostics.Destinations.FileDestination TempDest = new TerWoord.Diagnostics.Destinations.FileDestination();        
     TempDest.LogDirectory = Path.Combine(BaseDir.FullName, "detaillogs");                
     TempDest.Initialize();
     _LogCategory.Destins.Add(TempDest);
   }
   EnterMethod();
   try
   {      
     this.AppServer=server;
     this._BaseDirectory=BaseDir.FullName;
     SendValue("Base Directory", _BaseDirectory);
     _Name=ReadAppSetting(ConfigFile,"Application.Name",BaseDir.Name);
     SendValue("Name", _Name);
     AppServer=server;
     SecurityManager=server.SecurityManager;
     log=new ApplicationLog(_BaseDirectory + Path.DirectorySeparatorChar + "app.log");
     SendValue("Log file", _BaseDirectory + Path.DirectorySeparatorChar + "app.log");
     log.WriteLine("System","Application Started");
     SendString("Application Started");
     // Load Roles from Conig File
     XmlNodeList RoleList=ConfigFile.SelectNodes("/configuration/publishedRoles/role");
     if (RoleList.Count!=0)
     {
       Roles=new string[RoleList.Count];
       int i=0;
       foreach (XmlElement roleElement in RoleList)
       {
         Roles[i]=roleElement.InnerText;
         i++;
       }
     }
     SendValue("Roles", Roles);
   }
   catch(Exception E)
   {
     SendError(E);
     throw;
   }
   finally
   {
     ExitMethod();
   }
 }
Esempio n. 6
0
		public RemoteServerDynamicMessageSink(string AppName, ApplicationLog Log)
		{
			_AppName=AppName;
			_Log=Log;
		}
Esempio n. 7
0
		/// <summary>
		/// NKRemoteServerDynamicProperty constructor.
		/// </summary>
		public RemoteServerDynamicProperty (string appName, ApplicationLog log)
		{
			_Name=appName;
			_Log=log;
		}