Пример #1
0
        public static FieldLogItemViewModel Create(FieldLogItem item)
        {
            FieldLogTextItem textItem = item as FieldLogTextItem;

            if (textItem != null)
            {
                return(new FieldLogTextItemViewModel(textItem));
            }
            FieldLogDataItem dataItem = item as FieldLogDataItem;

            if (dataItem != null)
            {
                return(new FieldLogDataItemViewModel(dataItem));
            }
            FieldLogExceptionItem exceptionItem = item as FieldLogExceptionItem;

            if (exceptionItem != null)
            {
                return(new FieldLogExceptionItemViewModel(exceptionItem));
            }
            FieldLogScopeItem scopeItem = item as FieldLogScopeItem;

            if (scopeItem != null)
            {
                return(new FieldLogScopeItemViewModel(scopeItem));
            }
            return(null);
        }
 public FieldLogTextItemViewModel(FieldLogTextItem item)
 {
     this.Item = item;
     base.Item = item;
 }