public void CheckSemantics(IEnumerable <IConceptInfo> concepts) { if (!IsSupported(DataStructure)) { throw new DslSyntaxException( string.Format("{0} must be used inside writable data structure. DateStructure {1} is of type {2}.", this.GetUserDescription(), DataStructure, DataStructure.GetType().FullName)); } DslUtility.ValidatePropertyListSyntax(PropertyNames, this); }
public int TightMarshalNestedObject1(DataStructure o, BooleanStream bs) { bs.WriteBoolean(o != null); if(null == o) { return 0; } if(o.IsMarshallAware()) { MarshallAware ma = (MarshallAware) o; byte[] sequence = ma.GetMarshalledForm(this); bs.WriteBoolean(sequence != null); if(sequence != null) { return 1 + sequence.Length; } } byte type = o.GetDataStructureType(); if(type == 0) { throw new IOException("No valid data structure type for: " + o + " of type: " + o.GetType()); } BaseDataStreamMarshaller dsm = GetDataStreamMarshallerForType(type); Tracer.Debug("Marshalling type: " + type + " with structure: " + o); return 1 + dsm.TightMarshal1(this, o, bs); }
public int TightMarshalNestedObject1(DataStructure o, BooleanStream bs) { bs.WriteBoolean(o != null); if (o == null) return 0; if (o.IsMarshallAware()) { MarshallAware ma = (MarshallAware) o; byte[] sequence = ma.GetMarshalledForm(this); bs.WriteBoolean(sequence != null); if (sequence != null) { return 1 + sequence.Length; } } byte type = o.GetDataStructureType(); if (type == 0) { throw new IOException("No valid data structure type for: " + o + " of type: " + o.GetType()); } BaseDataStreamMarshaller dsm = (BaseDataStreamMarshaller) dataMarshallers[type & 0xFF]; if (dsm == null) throw new IOException("Unknown data type: " + type); //Console.WriteLine("Marshalling type: " + type + " with structure: " + o); return 1 + dsm.TightMarshal1(this, o, bs); }
public int TightMarshalNestedObject1(DataStructure o, BooleanStream bs) { bs.WriteBoolean(o != null); if (null == o) { return(0); } if (o.IsMarshallAware()) { MarshallAware ma = (MarshallAware)o; byte[] sequence = ma.GetMarshalledForm(this); bs.WriteBoolean(sequence != null); if (sequence != null) { return(1 + sequence.Length); } } byte type = o.GetDataStructureType(); if (type == 0) { throw new IOException("No valid data structure type for: " + o + " of type: " + o.GetType()); } BaseDataStreamMarshaller dsm = GetDataStreamMarshallerForType(type); Tracer.Debug("Marshalling type: " + type + " with structure: " + o); return(1 + dsm.TightMarshal1(this, o, bs)); }
public int TightMarshalNestedObject1(DataStructure o, BooleanStream bs) { bs.WriteBoolean(o != null); if (o == null) { return(0); } if (o.IsMarshallAware()) { MarshallAware ma = (MarshallAware)o; byte[] sequence = ma.GetMarshalledForm(this); bs.WriteBoolean(sequence != null); if (sequence != null) { return(1 + sequence.Length); } } byte type = o.GetDataStructureType(); if (type == 0) { throw new IOException("No valid data structure type for: " + o + " of type: " + o.GetType()); } BaseDataStreamMarshaller dsm = (BaseDataStreamMarshaller)dataMarshallers[type & 0xFF]; if (dsm == null) { throw new IOException("Unknown data type: " + type); } //Console.WriteLine("Marshalling type: " + type + " with structure: " + o); return(1 + dsm.TightMarshal1(this, o, bs)); }