Ejemplo 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);
 }
Ejemplo 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);
        }
Ejemplo 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();
        }
Ejemplo 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();
        }
Ejemplo 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);
 }
Ejemplo 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;
 }