Example #1
0
 public override int GetHashCode()
 {
     unchecked
     {
         int result = _annotationDefs.GetHashCodeDeep();
         result = result * 397 + _groupComparisonDefs.GetHashCodeDeep();
         result = result * 397 + ViewSpecList.GetHashCode();
         result = result * 397 + (PanoramaPublishUri == null ? 0 : PanoramaPublishUri.GetHashCode());
         result = result * 397 + (DocumentGuid == null ? 0 : DocumentGuid.GetHashCode());
         return(result);
     }
 }
Example #2
0
        public void WriteXml(XmlWriter writer)
        {
            if (PanoramaPublishUri != null)
            {
                writer.WriteAttributeIfString(Attr.panorama_publish_uri, PanoramaPublishUri.ToString());
            }
//            Assume.IsFalse(string.IsNullOrEmpty(DocumentGuid)); // Should have a document GUID by this point
            if (!string.IsNullOrEmpty(DocumentGuid))
            {
                writer.WriteAttributeString(Attr.document_guid, DocumentGuid);
            }
            var elements = AnnotationDefs.Cast <IXmlSerializable>().Concat(GroupComparisonDefs);

            if (ViewSpecList.ViewSpecs.Any())
            {
                elements = elements.Concat(new[] { ViewSpecList });
            }
            writer.WriteElements(elements, GetElementHelpers());
        }