Esempio n. 1
0
 /// <summary>
 /// Use this constructor when you don't want some things emitted into the output.
 /// For instance, if <paramref name="e"/> is <code>EmitOptions.ExtVis</code>
 /// then all methods, types, etc., that are not visible outside of the assembly are not emitted into the output.
 /// </summary>
 /// <param name="e">
 /// Indicates what to emit and what to leave out.
 /// For instance, if it is <code>EmitOptions.ExtVis</code>
 /// then all methods, types, etc., that are not visible outside of the assembly
 /// are not emitted into the output.
 /// </param>
 /// <param name="keepAttributes">
 /// Specify whether to keep custom attributes on types, methods, assembly, etc.
 /// </param>
 /// <param name="exemptAttributes">
 /// A list of attribute names that are exempt from the polarity of <paramref name="keepAttributes"/>.
 /// For instance, if <paramref name="keepAttributes"/> is true, then if an attribute is in the list, that
 /// means to not emit it. Conversely, if <paramref name="keepAttributes"/> is false, then if it is in the
 /// list, it means to emit it.
 /// </param>
 /// <param name="backwardCompatibility">
 /// When true, then this behaves just like the original AsmMeta. That means, among other things, that the argument values
 /// of <paramref name="e"/> and <paramref name="keepAttributes"/> are ignored and the values KeepOptions.ExtVis and
 /// false, respectively, are used instead.
 /// </param>
 public DeleteThings(AsmMetaHostEnvironment host, KeepOptions e, SecurityKeepOptions transparency, bool keepAttributes, string[] exemptAttributes, bool backwardCompatibility)
   : base(host) {
   this.asmMetaHostEnvironment = host;
   if (backwardCompatibility) {
     this.WhatToKeep = KeepOptions.ExtVis;
     this.KeepAttributes = false;
     this.backwardCompat = true;
     this.SecurityWhatToKeep = SecurityKeepOptions.All;
   } else {
     this.WhatToKeep = e;
     this.KeepAttributes = keepAttributes;
     this.SecurityWhatToKeep = transparency;
   }
   for (int i = 0, n = exemptAttributes == null ? 0 : exemptAttributes.Length; i < n; i++) {
     this.ExemptAttributes[exemptAttributes[i]] = true;
   }
 }
Esempio n. 2
0
 /// <summary>
 /// Use this constructor when you don't want some things emitted into the output.
 /// For instance, if <paramref name="e"/> is <code>EmitOptions.ExtVis</code>
 /// then all methods, types, etc., that are not visible outside of the assembly are not emitted into the output.
 /// </summary>
 /// <param name="e">
 /// Indicates what to emit and what to leave out.
 /// For instance, if it is <code>EmitOptions.ExtVis</code>
 /// then all methods, types, etc., that are not visible outside of the assembly
 /// are not emitted into the output.
 /// </param>
 /// <param name="keepAttributes">
 /// Specify whether to keep custom attributes on types, methods, assembly, etc.
 /// </param>
 /// <param name="exemptAttributes">
 /// A list of attribute names that are exempt from the polarity of <paramref name="keepAttributes"/>.
 /// For instance, if <paramref name="keepAttributes"/> is true, then if an attribute is in the list, that
 /// means to not emit it. Conversely, if <paramref name="keepAttributes"/> is false, then if it is in the
 /// list, it means to emit it.
 /// </param>
 /// <param name="backwardCompatibility">
 /// When true, then this behaves just like the original AsmMeta. That means, among other things, that the argument values
 /// of <paramref name="e"/> and <paramref name="keepAttributes"/> are ignored and the values KeepOptions.ExtVis and
 /// false, respectively, are used instead.
 /// </param>
 public DeleteThings(AsmMetaHostEnvironment host, KeepOptions e, SecurityKeepOptions transparency, bool keepAttributes, string[] exemptAttributes, bool backwardCompatibility)
     : base(host)
 {
     this.asmMetaHostEnvironment = host;
     if (backwardCompatibility)
     {
         this.WhatToKeep         = KeepOptions.ExtVis;
         this.KeepAttributes     = false;
         this.backwardCompat     = true;
         this.SecurityWhatToKeep = SecurityKeepOptions.All;
     }
     else
     {
         this.WhatToKeep         = e;
         this.KeepAttributes     = keepAttributes;
         this.SecurityWhatToKeep = transparency;
     }
     for (int i = 0, n = exemptAttributes == null ? 0 : exemptAttributes.Length; i < n; i++)
     {
         this.ExemptAttributes[exemptAttributes[i]] = true;
     }
 }