Beispiel #1
0
        public static LoggingInfo Parse(JObject json)
        {
            JToken temp;

            string          argument = null, type = null;
            LoggingFileInfo file = new LoggingFileInfo();

            if (json.TryGetValue("file", out temp) && temp.Type == JTokenType.Object)
            {
                file = LoggingFileInfo.Parse(JObject.Parse(temp.ToString()));
            }
            if (json.TryGetValue("argument", out temp) && temp.Type == JTokenType.String)
            {
                argument = temp.ToString();
            }
            if (json.TryGetValue("type", out temp) && temp.Type == JTokenType.String)
            {
                type = temp.ToString();
            }

            return(new LoggingInfo(file, argument, type));
        }
Beispiel #2
0
 public LoggingInfo(LoggingFileInfo file, string argument, string type)
 {
     File     = file;
     Argument = argument;
     Type     = type;
 }