Exemplo n.º 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);
        }
Exemplo n.º 2
0
        public FieldLogScopeItemViewModel(FieldLogScopeItem item)
        {
            this.Item = item;
            base.Item = item;

            this.EnvironmentVM    = new FieldLogEnvironmentViewModel(item.EnvironmentData, this);
            this.WebRequestDataVM = new FieldLogWebRequestDataViewModel(item.WebRequestData, this);
        }