コード例 #1
0
 /// <summary>
 /// The MeasurerService calls LoadConfig method after the properties are set.
 /// </summary>
 public void LoadConfig()
 {
     // Do your plugin configs here if needed. The ConfigurationFile does not need to be a file! For the MeasurerService it is a string.
     if (!string.IsNullOrEmpty(this.ConfigurationFile))
     {
         // when accessing files note that the default working directory is the one where the service exe file is.
         // you can use GetPluginRootedPath() extension method to get rooted path for plugins folder.
         settings = SerializeHelper.DeserializeWithDCS <RemoteMXPluginSettings>(System.IO.File.ReadAllText(this.ConfigurationFile.GetPluginRootedPath()));
     }
 }
コード例 #2
0
 /// <summary>
 /// The MeasurerService calls Dispose method when the service is closing.
 /// </summary>
 public void Dispose()
 {
     this.settings = null;
 }