Ejemplo n.º 1
0
        private T ReadStructInternal <T>() where T : new()
        {
            INdrStructure s = (INdrStructure) new T();

            Align(s.GetAlignment());
            s.Unmarshal(this);
            return((T)s);
        }
Ejemplo n.º 2
0
        private T ReadStructInternal <T>(bool top_level_struct) where T : new()
        {
            INdrStructure s          = (INdrStructure) new T();
            bool          conformant = false;

            if (top_level_struct && s is INdrConformantStructure conformant_struct)
            {
                conformant = SetupConformance(conformant_struct.GetConformantDimensions());
                System.Diagnostics.Debug.Assert(_conformance_values != null);
            }

            Align(s.GetAlignment());
            s.Unmarshal(this);

            if (conformant)
            {
                System.Diagnostics.Debug.Assert(_conformance_values == null);
            }

            return((T)s);
        }
Ejemplo n.º 3
0
 private void WriteStructInternal(INdrStructure structure)
 {
     Align(structure.GetAlignment());
     structure.Marshal(this);
 }