public GetOrCreateFolderData(string systemName)
 {
     if (systemName == null)
     {
         throw new ArgumentNullException("systemName");
     }
     SystemName = systemName;
     Properties = new ExtentionPropertyCollection();
 }
Exemplo n.º 2
0
 public void CopyFrom(ExtentionPropertyCollection properties)
 {
     if (properties != null)
     {
         foreach (var property in properties)
         {
             Add(property);
         }
     }
 }
Exemplo n.º 3
0
 public GetOrCreateComponentData(string systemName, IComponentTypeControl componentTypeControl)
 {
     if (systemName == null)
     {
         throw new ArgumentNullException("systemName");
     }
     if (componentTypeControl == null)
     {
         throw new ArgumentNullException("componentTypeControl");
     }
     SystemName           = systemName;
     ComponentTypeControl = componentTypeControl;
     Properties           = new ExtentionPropertyCollection();
 }
Exemplo n.º 4
0
 protected SendEventBase(IComponentControl componentControl, string typeSystemName)
 {
     if (componentControl == null)
     {
         throw new ArgumentNullException("componentControl");
     }
     if (typeSystemName == null)
     {
         throw new ArgumentNullException("typeSystemName");
     }
     ComponentControl = componentControl;
     TypeSystemName   = typeSystemName;
     Properties       = new ExtentionPropertyCollection();
 }
Exemplo n.º 5
0
        public ApplicationErrorData CreateEventFromLog(IComponentControl componentControl, LogLevel level, Exception exception, string message, IDictionary <string, object> properties)
        {
            EventImportance importance;

            if (level == LogLevel.Fatal)
            {
                importance = EventImportance.Alarm;
            }
            else if (level == LogLevel.Warning || level == LogLevel.Error)
            {
                importance = EventImportance.Warning;
            }
            else if (level == LogLevel.Info)
            {
                importance = EventImportance.Success;
            }
            else
            {
                importance = EventImportance.Unknown;
            }

            ApplicationErrorData data;

            if (exception != null)
            {
                data = componentControl.CreateApplicationError(exception);
                if (data.Message != message)
                {
                    data.Message = message + " : " + data.Message;
                }
            }
            else
            {
                data = componentControl.CreateApplicationError("CustomError", message);
                data.SetProperty(ExtentionPropertyName.Stack, Environment.StackTrace);
            }

            data.SetImportance(importance).SetProperty("FromLog", true);

            var propertiesCollection = new ExtentionPropertyCollection(properties);

            foreach (var property in propertiesCollection)
            {
                data.Properties.Add(property);
            }

            return(data);
        }
Exemplo n.º 6
0
 public LogInfo()
 {
     Properties = new ExtentionPropertyCollection();
 }
Exemplo n.º 7
0
 public SendLogData()
 {
     Properties = new ExtentionPropertyCollection();
 }
 public ApplicationErrorException(string type, string message, Exception innerException)
     : base(message, innerException)
 {
     Type       = type;
     Properties = new ExtentionPropertyCollection();
 }
Exemplo n.º 9
0
 public SendUnitTestResultData()
 {
     Properties = new ExtentionPropertyCollection();
 }
Exemplo n.º 10
0
 public LogMessage()
 {
     Properties = new ExtentionPropertyCollection();
 }
Exemplo n.º 11
0
 public UpdateComponentData()
 {
     Properties = new ExtentionPropertyCollection();
 }