/// <summary> /// Use to enable obfuscation of metadata names (namespaces, types, methods, /// fields, events, properties, parameters) /// This method only schedules the operation and returns immediately. The operation itself will be performed at /// the appropriate time, after the <see cref="IContext.Run()"/> method is called. /// </summary> /// <param name="ctx">Netfuser context</param> /// <param name="options">Mangler options</param> /// <returns>Netfuser context</returns> public static IContext MangleMetadata(this IContext ctx, MetadataManglerOptions options = null) { var c = (IContextImpl)ctx; c.Register <IMetadataMangler>(new MetadataManglerPlugin(c, options ?? new MetadataManglerOptions())); return(ctx); }
public MetadataManglerPlugin(IContextImpl context, MetadataManglerOptions options) : base(context) { _options = options; _root = new MetadataElement.Root(); _rng = context.Plugin <IRngPlugin>().Get(NetfuserFactory.MetadataManglerName); _ns = context.Plugin <INaming>(); }