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

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

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

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

			Reinitialize();
		}
Exemple #4
0
		public MethodSpecVM(MethodSpecOptions options, TypeSigCreatorOptions typeSigCreatorOptions) {
			origOptions = options;
			this.typeSigCreatorOptions = typeSigCreatorOptions;
			CustomAttributesVM = new CustomAttributesVM(typeSigCreatorOptions.OwnerModule, typeSigCreatorOptions.DecompilerService);

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

			CreateTypeSigArrayVM = new CreateTypeSigArrayVM(typeSigCreatorOptions, null);

			Reinitialize();
		}
Exemple #5
0
        public MethodSpecVM(MethodSpecOptions options, TypeSigCreatorOptions typeSigCreatorOptions)
        {
            origOptions = options;
            this.typeSigCreatorOptions = typeSigCreatorOptions;
            CustomAttributesVM         = new CustomAttributesVM(typeSigCreatorOptions.OwnerModule, typeSigCreatorOptions.DecompilerService);

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

            CreateTypeSigArrayVM = new CreateTypeSigArrayVM(typeSigCreatorOptions, null);

            Reinitialize();
        }
Exemple #6
0
        public MethodSpecVM(MethodSpecOptions options, TypeSigCreatorOptions typeSigCreatorOptions)
        {
            this.origOptions           = options;
            this.typeSigCreatorOptions = typeSigCreatorOptions;
            this.customAttributesVM    = new CustomAttributesVM(typeSigCreatorOptions.OwnerModule, typeSigCreatorOptions.LanguageManager);

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

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

            Reinitialize();
        }
Exemple #7
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;
		}
Exemple #8
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);
		}