コード例 #1
0
            public static void Save(IValueSink sink, ObjectSpecifierType value)
            {
                sink.EnterChoice((byte)value.Tag);
                switch (value.Tag)
                {
                case Tags.ObjectType:
                    Value <ObjectTypeWrapper> .Save(sink, (ObjectTypeWrapper)value);

                    break;

                case Tags.ObjectIdentifier:
                    Value <ObjectIdentifierWrapper> .Save(sink, (ObjectIdentifierWrapper)value);

                    break;

                default:
                    throw new Exception();
                }
                sink.LeaveChoice();
            }
コード例 #2
0
            public static ObjectSpecifierType Load(IValueStream stream)
            {
                ObjectSpecifierType ret = null;
                Tags tag = (Tags)stream.EnterChoice();

                switch (tag)
                {
                case Tags.ObjectType:
                    ret = Value <ObjectTypeWrapper> .Load(stream);

                    break;

                case Tags.ObjectIdentifier:
                    ret = Value <ObjectIdentifierWrapper> .Load(stream);

                    break;

                default:
                    throw new Exception();
                }
                stream.LeaveChoice();
                return(ret);
            }
コード例 #3
0
 public static void Save(IValueSink sink, ObjectSpecifierType value)
 {
     sink.EnterChoice((byte)value.Tag);
     switch(value.Tag)
     {
         case Tags.ObjectType:
             Value<ObjectTypeWrapper>.Save(sink, (ObjectTypeWrapper)value);
             break;
         case Tags.ObjectIdentifier:
             Value<ObjectIdentifierWrapper>.Save(sink, (ObjectIdentifierWrapper)value);
             break;
         default:
             throw new Exception();
     }
     sink.LeaveChoice();
 }
コード例 #4
0
 public CreateObjectRequest(ObjectSpecifierType objectSpecifier, Option<ReadOnlyArray<PropertyValue>> listOfInitialValues)
 {
     this.ObjectSpecifier = objectSpecifier;
     this.ListOfInitialValues = listOfInitialValues;
 }
コード例 #5
0
 public CreateObjectRequest(ObjectSpecifierType objectSpecifier, Option <ReadOnlyArray <PropertyValue> > listOfInitialValues)
 {
     this.ObjectSpecifier     = objectSpecifier;
     this.ListOfInitialValues = listOfInitialValues;
 }