Ejemplo n.º 1
0
        internal AttributeConstraint(XsdAttributeUse xsdAttributeUse, SimpleTypeRestriction simpleTypeConstraint)
        {
            Debug.Assert(simpleTypeConstraint != null);

            this.XsdAttributeUse = xsdAttributeUse;
            this.SimpleTypeConstraint = simpleTypeConstraint;
        }
Ejemplo n.º 2
0
        public AttributeConstraint(XsdAttributeUse xsdAttributeUse, SimpleTypeRestriction simpleTypeConstraint)
        {
            Debug.Assert(simpleTypeConstraint != null);

            this.XsdAttributeUse      = xsdAttributeUse;
            this.SimpleTypeConstraint = simpleTypeConstraint;
        }
Ejemplo n.º 3
0
        internal AttributeConstraint(XsdAttributeUse xsdAttributeUse, SimpleTypeRestriction simpleTypeConstraint, FileFormatVersions supportedVersion)
        {
            Debug.Assert(simpleTypeConstraint != null);

            this.XsdAttributeUse = xsdAttributeUse;
            this.SimpleTypeConstraint = simpleTypeConstraint;
            this.SupportedVersion = supportedVersion;
        }
Ejemplo n.º 4
0
        public AttributeConstraint(XsdAttributeUse xsdAttributeUse, SimpleTypeRestriction simpleTypeConstraint, FileFormatVersions supportedVersion)
        {
            Debug.Assert(simpleTypeConstraint != null);

            this.XsdAttributeUse      = xsdAttributeUse;
            this.SimpleTypeConstraint = simpleTypeConstraint;
            this.SupportedVersion     = supportedVersion;
        }
Ejemplo n.º 5
0
        public void SdbAttributeConstraintTest()
        {
            const XsdAttributeUse AttributeUse      = XsdAttributeUse.Prohibited;
            const ushort          SimpleTypeIndex   = 53;
            const byte            FileFormatVersion = 32;

            var instance = new SdbAttributeConstraint(AttributeUse, SimpleTypeIndex, FileFormatVersion);

            Assert.Equal(AttributeUse, instance.AttributeUse);
            Assert.Equal(SimpleTypeIndex, instance.SimpleTypeIndex);
            Assert.Equal(FileFormatVersion, instance.FileFormatVersion);

            var bytes        = VerifyBytes(instance, new byte[] { 0x02, 0x35, 0x00, 0x20 });
            var deserialized = Assert.Single(Deserialize <SdbAttributeConstraint>(bytes));

            Assert.Equal(AttributeUse, deserialized.AttributeUse);
            Assert.Equal(SimpleTypeIndex, deserialized.SimpleTypeIndex);
            Assert.Equal(FileFormatVersion, deserialized.FileFormatVersion);

            Assert.Equal(instance, deserialized);
        }
 public static byte[] Bytes(this XsdAttributeUse value)
 {
     return(new byte[1] {
         (byte)value
     });
 }
 public SdbAttributeConstraint(XsdAttributeUse xsdAttributeUse, SdbIndex simpleTypeIndex, byte fileFormatVersion)
 {
     this.AttributeUse      = xsdAttributeUse;
     this.SimpleTypeIndex   = simpleTypeIndex;
     this.FileFormatVersion = fileFormatVersion;
 }
Ejemplo n.º 8
0
 public SdbAttributeConstraint(XsdAttributeUse xsdAttributeUse, SdbIndex simpleTypeIndex, byte fileFormatVersion)
 {
     this.AttributeUse = xsdAttributeUse;
     this.SimpleTypeIndex = simpleTypeIndex;
     this.FileFormatVersion = fileFormatVersion;
 }
Ejemplo n.º 9
0
 public SdbAttributeConstraint(XsdAttributeUse attributeUse, ushort simpleTypeIndex, byte fileFormatVersion)
 {
     _attributeUse      = attributeUse;
     _simpleTypeIndex   = simpleTypeIndex;
     _fileFormatVersion = fileFormatVersion;
 }
 public SdbAttributeConstraint(XsdAttributeUse xsdAttributeUse, ushort simpleTypeIndex, byte fileFormatVersion)
 {
     AttributeUse      = xsdAttributeUse;
     SimpleTypeIndex   = simpleTypeIndex;
     FileFormatVersion = fileFormatVersion;
 }