/// <summary>Initializes <see cref="securityAttributes"/></summary> protected virtual void InitializeSecurityAttributes() { Interlocked.CompareExchange(ref securityAttributes, ThreadSafeListCreator.Create <SecurityAttribute>(), null); }
/// <summary> /// Constructor /// </summary> /// <param name="local1">Local type #1</param> /// <param name="local2">Local type #2</param> /// <param name="local3">Local type #3</param> public LocalSig(TypeSig local1, TypeSig local2, TypeSig local3) { this.callingConvention = CallingConvention.LocalSig; this.locals = ThreadSafeListCreator.Create <TypeSig>(local1, local2, local3); }
/// <summary> /// Constructor /// </summary> /// <param name="callingConvention">Calling convention (must have GenericInst set)</param> /// <param name="size">Number of generic args</param> internal GenericInstMethodSig(CallingConvention callingConvention, uint size) { this.callingConvention = callingConvention; this.genericArgs = ThreadSafeListCreator.Create <TypeSig>((int)size); }
/// <inheritdoc/> public override ThreadSafe.IList <uint> GetSizes() { return(ThreadSafeListCreator.Create <uint>()); }
/// <summary> /// Initializes <see cref="otherMethods"/>, <see cref="addMethod"/>, /// <see cref="invokeMethod"/> and <see cref="removeMethod"/>. /// </summary> protected virtual void InitializeEventMethods_NoLock() { otherMethods = ThreadSafeListCreator.Create <MethodDef>(); }
/// <summary> /// Constructor /// </summary> /// <param name="genericType">The generic type</param> /// <param name="genArgCount">Number of generic arguments</param> public GenericInstSig(ClassOrValueTypeSig genericType, uint genArgCount) { this.genericType = genericType; this.genericArgs = ThreadSafeListCreator.Create <TypeSig>((int)genArgCount); }
/// <summary> /// Constructor /// </summary> /// <param name="genericType">The generic type</param> /// <param name="genArgs">Generic arguments</param> public GenericInstSig(ClassOrValueTypeSig genericType, IList <TypeSig> genArgs) { this.genericType = genericType; this.genericArgs = ThreadSafeListCreator.Create <TypeSig>(genArgs); }
/// <summary> /// Gets the generic arguments /// </summary> /// <param name="sig">this</param> /// <returns>All generic arguments</returns> public static IList <TypeSig> GetGenericArguments(this GenericInstMethodSig sig) { return(sig == null?ThreadSafeListCreator.Create <TypeSig>() : sig.GenericArguments); }
/// <summary> /// Default constructor /// </summary> public MethodSig() { this.parameters = ThreadSafeListCreator.Create <TypeSig>(); }
/// <summary> /// Gets the parameters /// </summary> /// <param name="sig">this</param> /// <returns>The parameters</returns> public static IList <TypeSig> GetParams(this MethodBaseSig sig) { return(sig == null?ThreadSafeListCreator.Create <TypeSig>() : sig.Params); }
/// <summary> /// Gets the locals /// </summary> /// <param name="sig">this</param> /// <returns>All locals</returns> public static IList <TypeSig> GetLocals(this LocalSig sig) { return(sig == null?ThreadSafeListCreator.Create <TypeSig>() : sig.Locals); }
/// <summary> /// Constructor /// </summary> /// <param name="callingConvention">Calling convention (must have LocalSig set)</param> /// <param name="count">Number of locals</param> internal LocalSig(CallingConvention callingConvention, uint count) { this.callingConvention = callingConvention; this.locals = ThreadSafeListCreator.Create <TypeSig>((int)count); }
/// <summary> /// Initializes <see cref="otherMethods"/>, <see cref="getMethods"/>, /// and <see cref="setMethods"/>. /// </summary> protected virtual void InitializePropertyMethods_NoLock() { getMethods = ThreadSafeListCreator.Create <MethodDef>(); setMethods = ThreadSafeListCreator.Create <MethodDef>(); otherMethods = ThreadSafeListCreator.Create <MethodDef>(); }
/// <summary>Initializes <see cref="customDebugInfos"/></summary> protected virtual void InitializeCustomDebugInfos() { Interlocked.CompareExchange(ref customDebugInfos, ThreadSafeListCreator.Create <PdbCustomDebugInfo>(), null); }
/// <summary>Initializes <see cref="overrides"/></summary> protected virtual void InitializeOverrides() { Interlocked.CompareExchange(ref overrides, ThreadSafeListCreator.Create <MethodOverride>(), null); }
/// <summary> /// Constructor /// </summary> /// <param name="callingConvention">Calling convention</param> public MethodSig(CallingConvention callingConvention) { this.callingConvention = callingConvention; this.parameters = ThreadSafeListCreator.Create <TypeSig>(); }
/// <summary> /// Default constructor /// </summary> public GenericInstSig() { this.genericArgs = ThreadSafeListCreator.Create <TypeSig>(); }
/// <summary> /// Constructor /// </summary> /// <param name="callingConvention">Calling convention</param> /// <param name="genParamCount">Number of generic parameters</param> public MethodSig(CallingConvention callingConvention, uint genParamCount) { this.callingConvention = callingConvention; this.genParamCount = genParamCount; this.parameters = ThreadSafeListCreator.Create <TypeSig>(); }
/// <summary> /// Constructor /// </summary> /// <param name="genericType">The generic type</param> /// <param name="genArg1">Generic argument #1</param> /// <param name="genArg2">Generic argument #2</param> /// <param name="genArg3">Generic argument #3</param> public GenericInstSig(ClassOrValueTypeSig genericType, TypeSig genArg1, TypeSig genArg2, TypeSig genArg3) { this.genericType = genericType; this.genericArgs = ThreadSafeListCreator.Create <TypeSig>(genArg1, genArg2, genArg3); }
/// <summary> /// Default constructor /// </summary> public PropertySig() { this.callingConvention = CallingConvention.Property; this.parameters = ThreadSafeListCreator.Create <TypeSig>(); }
/// <summary> /// Constructor /// </summary> /// <param name="arrayType">Array type</param> public ArraySig(TypeSig arrayType) : base(arrayType) { this.sizes = ThreadSafeListCreator.Create <uint>(); this.lowerBounds = ThreadSafeListCreator.Create <int>(); }
/// <summary> /// Constructor /// </summary> /// <param name="callingConvention">Calling convention (must have Property set)</param> internal PropertySig(CallingConvention callingConvention) { this.callingConvention = callingConvention; this.parameters = ThreadSafeListCreator.Create <TypeSig>(); }
/// <inheritdoc/> public override ThreadSafe.IList <int> GetLowerBounds() { return(ThreadSafeListCreator.Create <int>()); }
/// <summary> /// Constructor /// </summary> /// <param name="hasThis"><c>true</c> if instance, <c>false</c> if static</param> public PropertySig(bool hasThis) { this.callingConvention = CallingConvention.Property | (hasThis ? CallingConvention.HasThis : 0); this.parameters = ThreadSafeListCreator.Create <TypeSig>(); }
/// <summary> /// Constructor /// </summary> /// <param name="ctor">Custom attribute constructor</param> /// <param name="arguments">Constructor arguments or <c>null</c> if none</param> /// <param name="namedArguments">Named arguments or <c>null</c> if none</param> /// <param name="blobReader">A reader that returns the original custom attribute blob data</param> public CustomAttribute(ICustomAttributeType ctor, IEnumerable <CAArgument> arguments, IEnumerable <CANamedArgument> namedArguments, IBinaryReader blobReader) { this.ctor = ctor; this.arguments = arguments == null?ThreadSafeListCreator.Create <CAArgument>() : ThreadSafeListCreator.Create <CAArgument>(arguments); this.namedArguments = namedArguments == null?ThreadSafeListCreator.Create <CANamedArgument>() : ThreadSafeListCreator.Create <CANamedArgument>(namedArguments); this.blobReader = blobReader; }
/// <summary> /// Constructor /// </summary> /// <param name="hasThis"><c>true</c> if instance, <c>false</c> if static</param> /// <param name="retType">Return type</param> /// <param name="argTypes">Argument types</param> public PropertySig(bool hasThis, TypeSig retType, params TypeSig[] argTypes) { this.callingConvention = CallingConvention.Property | (hasThis ? CallingConvention.HasThis : 0); this.retType = retType; this.parameters = ThreadSafeListCreator.Create <TypeSig>(argTypes); }
/// <summary> /// Constructor /// </summary> /// <param name="locals">All locals</param> public LocalSig(IList <TypeSig> locals) { this.callingConvention = CallingConvention.LocalSig; this.locals = ThreadSafeListCreator.Create <TypeSig>(locals); }
/// <summary>Initializes <see cref="declSecurities"/></summary> protected virtual void InitializeDeclSecurities() { Interlocked.CompareExchange(ref declSecurities, ThreadSafeListCreator.Create <DeclSecurity>(), null); }
/// <summary> /// Constructor /// </summary> /// <param name="arg1">Generic arg #1</param> public GenericInstMethodSig(TypeSig arg1) { this.callingConvention = CallingConvention.GenericInst; this.genericArgs = ThreadSafeListCreator.Create <TypeSig>(arg1); }
/// <summary> /// Constructor /// </summary> public PdbAsyncMethodSteppingInformationCustomDebugInfo() { asyncStepInfos = ThreadSafeListCreator.Create <PdbAsyncStepInfo>(); }