Esempio n. 1
0
 MethodSpecOptions CopyTo(MethodSpecOptions options)
 {
     options.Method        = this.Method;
     options.Instantiation = new GenericInstMethodSig(CreateTypeSigArrayVM.TypeSigCollection);
     options.CustomAttributes.Clear();
     options.CustomAttributes.AddRange(CustomAttributesVM.Collection.Select(a => a.CreateCustomAttributeOptions().Create()));
     return(options);
 }
Esempio n. 2
0
        void InitializeFrom(MethodSpecOptions options)
        {
            this.Method = options.Method;
            var gim = options.Instantiation as GenericInstMethodSig;

            CreateTypeSigArrayVM.TypeSigCollection.Clear();
            if (gim != null)
            {
                CreateTypeSigArrayVM.TypeSigCollection.AddRange(gim.GenericArguments);
            }
            this.CustomAttributesVM.InitializeFrom(options.CustomAttributes);
        }
Esempio n. 3
0
        public MethodSpecVM(MethodSpecOptions options, TypeSigCreatorOptions typeSigCreatorOptions)
        {
            this.origOptions = options;
            this.typeSigCreatorOptions = typeSigCreatorOptions;
            this.customAttributesVM = new CustomAttributesVM(typeSigCreatorOptions.OwnerModule, typeSigCreatorOptions.Language);

            this.typeSigCreatorOptions.CanAddGenericMethodVar = true;
            this.typeSigCreatorOptions.CanAddGenericTypeVar = true;
            this.typeSigCreatorOptions.IsLocal = false;
            this.typeSigCreatorOptions.NullTypeSigAllowed = false;

            this.createTypeSigArrayVM = new CreateTypeSigArrayVM(typeSigCreatorOptions, null);

            Reinitialize();
        }
Esempio n. 4
0
        public MethodSpecVM(MethodSpecOptions options, TypeSigCreatorOptions typeSigCreatorOptions)
        {
            this.origOptions           = options;
            this.typeSigCreatorOptions = typeSigCreatorOptions;
            this.customAttributesVM    = new CustomAttributesVM(typeSigCreatorOptions.OwnerModule, typeSigCreatorOptions.Language);

            this.typeSigCreatorOptions.CanAddGenericMethodVar = true;
            this.typeSigCreatorOptions.CanAddGenericTypeVar   = true;
            this.typeSigCreatorOptions.IsLocal            = false;
            this.typeSigCreatorOptions.NullTypeSigAllowed = false;

            this.createTypeSigArrayVM = new CreateTypeSigArrayVM(typeSigCreatorOptions, null);

            Reinitialize();
        }
Esempio n. 5
0
 void InitializeFrom(MethodSpecOptions options)
 {
     this.Method = options.Method;
     var gim = options.Instantiation as GenericInstMethodSig;
     CreateTypeSigArrayVM.TypeSigCollection.Clear();
     if (gim != null)
         CreateTypeSigArrayVM.TypeSigCollection.AddRange(gim.GenericArguments);
     this.CustomAttributesVM.InitializeFrom(options.CustomAttributes);
 }
Esempio n. 6
0
 MethodSpecOptions CopyTo(MethodSpecOptions options)
 {
     options.Method = this.Method;
     options.Instantiation = new GenericInstMethodSig(CreateTypeSigArrayVM.TypeSigCollection);
     options.CustomAttributes.Clear();
     options.CustomAttributes.AddRange(CustomAttributesVM.Collection.Select(a => a.CreateCustomAttributeOptions().Create()));
     return options;
 }