Example #1
0
        public bool LoadConfiguration(string pathToConfig)
        {
            try
            {
                StreamReader str = new StreamReader(pathToConfig);

                XmlSerializer serializer = new XmlSerializer(typeof(VRASConfigurationType));

                return((this.vrasXsdConfig = (VRASConfigurationType)serializer.Deserialize(str)) != null);
            }
            catch (Exception ex)
            {
                VRASLogEvent.LogMesage(
                    VRASLogEvent.EventLogName,
                    "Error: " + ex.Message,
                    System.Diagnostics.EventLogEntryType.Error,
                    Convert.ToInt32(VRAS.VRASLogEvent.EventIDs.ErrorID),
                    VRASLogEvent.EventSourceDefault);

                return(false);
            }
        }
Example #2
0
 // actual working version of the configuration
 public VRASLoader(bool thisIsAService)
 {
     this.vrasXsdConfig = new VRASConfigurationType();
     this.isService     = thisIsAService;
 }