@@ -1000,15 +1000,21 @@ type MethodCodeKind =
10001000/// may include the bounds, if any, on the generic parameter.
10011001type ILGenericParameterDef =
10021002{ Name: string
1003- /// At most one is the parent type, the others are interface types.
1003+
1004+ /// At most one is the parent type, the others are interface types.
10041005 Constraints: ILTypes
1006+
10051007/// Variance of type parameters, only applicable to generic parameters for generic interfaces and delegates.
10061008 Variance: ILGenericVariance
1009+
10071010/// Indicates the type argument must be a reference type.
10081011 HasReferenceTypeConstraint: bool
1012+
10091013 CustomAttrs: ILAttributes
1014+
10101015/// Indicates the type argument must be a value type, but not Nullable.
10111016 HasNotNullableValueTypeConstraint: bool
1017+
10121018/// Indicates the type argument must have a public nullary constructor.
10131019 HasDefaultConstructorConstraint: bool }
10141020
@@ -1020,13 +1026,14 @@ type ILLazyMethodBody =
10201026
10211027/// IL Method definitions.
10221028///
1023- ///The object is immutable. We use a class to get control over the representation used,
1024- /// which allows more efficient representation of the information.
1029+ ///This type is immutable and record-like . We use a class to get control over the representation
1030+ ///used, which allows more efficient representation of the information.
10251031[<NoComparison; NoEquality>]
10261032type ILMethodDef =
1033+
1034+ /// Functional creation of a value
10271035new : name: string* attributes: MethodAttributes* implAttributes: MethodImplAttributes* callingConv: ILCallingConv* parameters: ILParameters* ret: ILReturn* body: ILLazyMethodBody* securityDecls: ILSecurityDecls* isEntryPoint: bool* genericParams: ILGenericParameterDefs* customAttrs: ILAttributes-> ILMethodDef
10281036
1029- member With : ?name : string * ?attributes : MethodAttributes * ?implAttributes : MethodImplAttributes * ?callingConv : ILCallingConv * ?parameters : ILParameters * ?ret : ILReturn * ?body : ILLazyMethodBody * ?securityDecls : ILSecurityDecls * ?isEntryPoint : bool * ?genericParams : ILGenericParameterDefs * ?customAttrs : ILAttributes -> ILMethodDef
10301037member Name : string
10311038member Attributes : MethodAttributes
10321039member ImplAttributes : MethodImplAttributes
@@ -1073,6 +1080,7 @@ type ILMethodDef =
10731080/// The method is exported to unmanaged code using COM interop.
10741081member IsUnmanagedExport : bool
10751082member IsReqSecObj : bool
1083+
10761084/// Some methods are marked "HasSecurity" even if there are no permissions attached, e.g. if they use SuppressUnmanagedCodeSecurityAttribute
10771085member HasSecurity : bool
10781086member IsManaged : bool
@@ -1086,6 +1094,8 @@ type ILMethodDef =
10861094/// SafeHandle finalizer must be run.
10871095member IsMustRun : bool
10881096
1097+ /// Functional update of the value
1098+ member With : ?name : string * ?attributes : MethodAttributes * ?implAttributes : MethodImplAttributes * ?callingConv : ILCallingConv * ?parameters : ILParameters * ?ret : ILReturn * ?body : ILLazyMethodBody * ?securityDecls : ILSecurityDecls * ?isEntryPoint : bool * ?genericParams : ILGenericParameterDefs * ?customAttrs : ILAttributes -> ILMethodDef
10891099 member WithSpecialName : ILMethodDef
10901100 member WithHideBySig : unit -> ILMethodDef
10911101 member WithHideBySig : bool -> ILMethodDef
@@ -1104,8 +1114,9 @@ type ILMethodDef =
11041114/// Tables of methods. Logically equivalent to a list of methods but
11051115/// the table is kept in a form optimized for looking up methods by
11061116/// name and arity.
1107-
1108- /// abstract type equivalent to [ ILMethodDef list ]
1117+ ///
1118+ /// This type is immutable and record - like. We use a class to get control over the representation
1119+ /// used , which allows more efficient representation of the information.
11091120[< NoEquality ; NoComparison ; Sealed >]
11101121type ILMethodDefs =
11111122interface IEnumerable< ILMethodDef>
@@ -1114,15 +1125,21 @@ type ILMethodDefs =
11141125member FindByName : string -> ILMethodDef list
11151126
11161127/// Field definitions.
1128+ ///
1129+ /// This type is immutable and record-like. We use a class to get control over the representation
1130+ /// used, which allows more efficient representation of the information.
11171131[<NoComparison; NoEquality>]
11181132type ILFieldDef =
1133+
1134+ /// Functional creation of a value
11191135new : name: string* fieldType: ILType* attributes: FieldAttributes* data: byte[] option* literalValue: ILFieldInit option* offset: int32 option* marshal: ILNativeType option* customAttrs: ILAttributes-> ILFieldDef
1120- member With : ?name : string * ?fieldType : ILType * ?attributes : FieldAttributes * ?data : byte [] option * ?literalValue : ILFieldInit option * ?offset : int32 option * ?marshal : ILNativeType option * ?customAttrs : ILAttributes -> ILFieldDef
1136+
11211137member Name : string
11221138member FieldType : ILType
11231139member Attributes : FieldAttributes
11241140member Data : byte [] option
11251141member LiteralValue : ILFieldInit option
1142+
11261143/// The explicit offset in bytes when explicit layout is used.
11271144member Offset : int32 option
11281145member Marshal : ILNativeType option
@@ -1133,6 +1150,9 @@ type ILFieldDef =
11331150member NotSerialized : bool
11341151member IsInitOnly : bool
11351152member Access : ILMemberAccess
1153+
1154+ /// Functional update of the value
1155+ member With : ?name : string * ?fieldType : ILType * ?attributes : FieldAttributes * ?data : byte [] option * ?literalValue : ILFieldInit option * ?offset : int32 option * ?marshal : ILNativeType option * ?customAttrs : ILAttributes -> ILFieldDef
11361156 member WithAccess : ILMemberAccess -> ILFieldDef
11371157 member WithInitOnly : bool -> ILFieldDef
11381158 member WithStatic : bool -> ILFieldDef
@@ -1150,10 +1170,15 @@ type ILFieldDefs =
11501170member LookupByName : string -> ILFieldDef list
11511171
11521172/// Event definitions.
1173+ ///
1174+ /// This type is immutable and record-like. We use a class to get control over the representation
1175+ /// used, which allows more efficient representation of the information.
11531176[<NoComparison; NoEquality>]
11541177type ILEventDef =
1178+
1179+ /// Functional creation of a value
11551180new : eventType: ILType option* name: string* attributes: EventAttributes* addMethod: ILMethodRef* removeMethod: ILMethodRef* fireMethod: ILMethodRef option* otherMethods: ILMethodRef list* customAttrs: ILAttributes-> ILEventDef
1156- member With : ?eventType : ILType option * ?name : string * ?attributes : EventAttributes * ?addMethod : ILMethodRef * ?removeMethod : ILMethodRef * ?fireMethod : ILMethodRef option * ?otherMethods : ILMethodRef list * ?customAttrs : ILAttributes -> ILEventDef
1181+
11571182member EventType : ILType option
11581183member Name : string
11591184member Attributes : EventAttributes
@@ -1165,17 +1190,31 @@ type ILEventDef =
11651190member IsSpecialName : bool
11661191member IsRTSpecialName : bool
11671192
1193+ /// Functional update of the value
1194+ member With : ?eventType : ILType option * ?name : string * ?attributes : EventAttributes * ?addMethod : ILMethodRef * ?removeMethod : ILMethodRef * ?fireMethod : ILMethodRef option * ?otherMethods : ILMethodRef list * ?customAttrs : ILAttributes -> ILEventDef
1195+
11681196/// Table of those events in a type definition.
1197+ ///
1198+ /// This type is immutable and record - like. We use a class to get control over the representation
1199+ /// used , which allows more efficient representation of the information.
11691200[< NoEquality ; NoComparison ; Sealed >]
11701201type ILEventDefs =
11711202member AsList : ILEventDef list
11721203member LookupByName : string -> ILEventDef list
11731204
11741205/// Property definitions
1206+ ///
1207+ /// This type is immutable and record-like. We use a class to get control over the representation
1208+ /// used, which allows more efficient representation of the information.
11751209[<NoComparison; NoEquality>]
11761210type ILPropertyDef =
1211+
1212+ /// Functional creation of a value
11771213new : name: string* attributes: PropertyAttributes* setMethod: ILMethodRef option* getMethod: ILMethodRef option* callingConv: ILThisConvention* propertyType: ILType* init: ILFieldInit option* args: ILTypes* customAttrs: ILAttributes-> ILPropertyDef
1214+
1215+ /// Functional update of the value
11781216member With : ?name : string * ?attributes : PropertyAttributes * ?setMethod : ILMethodRef option * ?getMethod : ILMethodRef option * ?callingConv : ILThisConvention * ?propertyType : ILType * ?init : ILFieldInit option * ?args : ILTypes * ?customAttrs : ILAttributes -> ILPropertyDef
1217+
11791218 member Name : string
11801219 member Attributes : PropertyAttributes
11811220 member SetMethod : ILMethodRef option
@@ -1267,9 +1306,9 @@ type ILTypeDefs =
12671306
12681307/// Represents IL Type Definitions.
12691308///
1270- ///The object is immutable. We use a class
1271- ///to get control over the representation used, which allows more efficient representation of the information.
1272- and [<NoComparison; NoEquality; Class >]
1309+ ///This type is immutable and record-like . We use a class to get control over the representation
1310+ /// used, which allows more efficient representation of the information.
1311+ and [<NoComparison; NoEquality>]
12731312ILTypeDef =
12741313
12751314/// Create the contents