private T ReadStructInternal <T>() where T : new() { INdrStructure s = (INdrStructure) new T(); Align(s.GetAlignment()); s.Unmarshal(this); return((T)s); }
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); }