Ejemplo n.º 1
0
 public object Clone()
 {
     ConfigurationV4 result = new ConfigurationV4();
     result.TeamProjectCollection = TeamProjectCollection;
     result.TeamProject = TeamProject;
     result.ChildItems.AddRange(ChildItems);
     result.BacklogItems.AddRange(BacklogItems);
     foreach (var state in States)
     {
         result.States.Add(state.Clone() as ICustomState);
     }
     result.SortFieldName = SortFieldName;
     result.SortDirection = SortDirection;
     result.RowSummaryFieldName = RowSummaryFieldName;
     result.ColumnSummaryFieldName = ColumnSummaryFieldName;
     result.LinkType = LinkType;
     result.QueryId = QueryId;
     result.ReportId = ReportId;
     result.ReportParameters.AddRange(ReportParameters);
     result.IsAutoRefreshChecked = IsAutoRefreshChecked;
     result.AutoRefreshDelay = AutoRefreshDelay;
     result.HideColumnSummaryFieldName = HideColumnSummaryFieldName;
     result.WorkItemSize = WorkItemSize;
     return result;
 }
Ejemplo n.º 2
0
 private ConfigurationV4 ReadTaskboardConfigurationV4(StreamReader s, string configurationData)
 {
     Logger.Write(TraceCategory.Information, "V4 .tbconfig version is being loaded");
     try
     {
         var serializer = new DataContractSerializer(typeof(ConfigurationV4), new[] { typeof(CustomState), typeof(WorkItemSize) });
         return((ConfigurationV4)serializer.ReadObject(s.BaseStream));
     }
     // this happens if old version of .tbconfig is being loaded
     catch (SerializationException)
     {
         Logger.Write(TraceCategory.Information, "V4 .tbconfig version could not be loaded");
         s.BaseStream.Seek(0, new SeekOrigin());
         ConfigurationV3 cfgV3 = ReadTaskboardConfigurationV3(s, configurationData);
         ConfigurationV4 cfg   = new ConfigurationV4();
         cfg.CopyFromConfigurationOld3(cfgV3);
         return(cfg);
     }
 }
Ejemplo n.º 3
0
 public void CopyFromConfigurationOld4(ConfigurationV4 configOld4)
 {
     CopyFromConfigurationOld3(configOld4);
     HideColumnSummaryFieldName = configOld4.HideColumnSummaryFieldName;
 }