Exemplo n.º 1
0
        public override bool CompareTo(object Comparand)
        {
            BinaryDataDocument cmpDoc = Comparand as BinaryDataDocument;

            if (cmpDoc != null)
            {
                Comparison.StreamComparator sc = new Comparison.StreamComparator();

                return(sc.CompareStreams(GetStream(), cmpDoc.GetStream()));
            }
            else
            {
                return(false);
            }
        }
Exemplo n.º 2
0
        public MDTemplate(IV8MetadataContainer MDContainer, String ObjID)
        {
            _Container = MDContainer;

            SerializedList header = new SerializedList(_Container.GetElement(ObjID).ReadAll());

            Kind = (TemplateKind)Enum.Parse(typeof(TemplateKind), header.Items[1].Items[1].ToString());

            ReadStringsBlock((SerializedList)header.Items[1].Items[2]);

            switch (Kind)
            {
            case MDTemplate.TemplateKind.Moxel:
            case MDTemplate.TemplateKind.Text:
            case MDTemplate.TemplateKind.GEOSchema:
            case MDTemplate.TemplateKind.GraphicChart:
            case MDTemplate.TemplateKind.DCSAppearanceTemplate:
                m_Document = new PersistedTemplateStub(this);
                break;

            case MDTemplate.TemplateKind.BinaryData:
                m_Document = new BinaryDataDocument(this);
                break;

            case MDTemplate.TemplateKind.HTMLDocument:
                m_Document = new HTMLTemplate(this);
                break;

            case MDTemplate.TemplateKind.DataCompositionSchema:
                m_Document = new DCSSchemaDocument(this);
                break;

            default:
                break;
            }
        }