Esempio n. 1
0
 public ExportTaskImplementation(TTask actualTask)
 {
     this._ActualTask = actualTask;
     this.AddServiceFactory <ExportTaskImplementation <TTask>, IDllExportNotifier>((Func <IServiceProvider, IDllExportNotifier>)(sp => (IDllExportNotifier) new ExportTaskImplementation <TTask> .DllExportNotifierWithTask(this._ActualTask)));
     this._Values = (IInputValues) new InputValuesCore((IServiceProvider)this);
     this.GetNotifier().Notification += new EventHandler <DllExportNotificationEventArgs>(this.OnDllWrapperNotification);
 }
Esempio n. 2
0
 public ExportAssemblyInspector(IInputValues inputValues)
 {
     if (inputValues == null)
     {
         throw new ArgumentNullException("inputValues");
     }
     this.InputValues = inputValues;
 }
Esempio n. 3
0
 protected IlToolBase(IServiceProvider serviceProvider, IInputValues inputValues)
     : base(serviceProvider)
 {
     if (inputValues == null)
     {
         throw new ArgumentNullException("inputValues");
     }
     this.InputValues = inputValues;
 }
Esempio n. 4
0
        public void AssignFrom(IExportInfo info, IInputValues input)
        {
            if (info == null || String.IsNullOrWhiteSpace(input.MetaLib))
            {
                throw new ArgumentNullException("IExportInfo or path to MetaLib cannot be null.");
            }

            setDefaultValues(input);
            setUserValues(info);
        }
Esempio n. 5
0
        private MethodDefinition getMetaCtor(IInputValues input)
        {
            ModuleDefinition module = ModuleDefinition.ReadModule(input.MetaLib);

            var _class = module.GetTypes()
                         .Where(t => t.FullName == input.DllExportAttributeFullName)
                         .FirstOrDefault();

            return(_class?
                   .Methods
                   .Where(c => c.Name == ".ctor")
                   .FirstOrDefault());
        }
Esempio n. 6
0
        protected void setDefaultValues(IInputValues input)
        {
            if (metaValues == null)
            {
                metaValues = getMetaValues(getMetaCtor(input));
            }

            Func <string, object, object> _ = delegate(string key, object def) {
                return(metaValues.ContainsKey(key) ? metaValues[key] : def);
            };

            CallingConvention = (CallingConvention)_("CallingConvention", CallingConvention.Cdecl);
            ExportName        = (string)_("ExportName", null);
        }
Esempio n. 7
0
 internal static IExportAssemblyInspector CreateAssemblyInspector(IInputValues inputValues)
 {
     return((IExportAssemblyInspector) new ExportAssemblyInspector(inputValues));
 }
Esempio n. 8
0
 public IlDasm(IServiceProvider serviceProvider, IInputValues inputValues)
     : base(serviceProvider, inputValues)
 {
 }