Example #1
0
 internal Property(Bridge pBridge, System.Type pType, object pInstance, System.Reflection.PropertyInfo pProperty)
 {
     this.lBridge = pBridge;
     this.lType = pType;
     this.lInstance = pInstance;
     this.lProperty = pProperty;
 }
Example #2
0
 internal Method(Bridge pBridge, System.Object pInstance, System.Type pType, System.String pMethodName)
 {
     this.lBridge = pBridge;
     this.lInstance = pInstance;
     this.lType = pType;
     this.lMethodName = pMethodName;
 }
Example #3
0
 internal Instance(Bridge pBridge)
 {
     this.lBridge = pBridge;
 }
Example #4
0
 internal Instance(Bridge pBridge, System.Object pObject)
 {
     this.lBridge = pBridge;
     if(pObject!=null) this.lType = pObject.GetType();
     this.lInstance = pObject;
 }
Example #5
0
 internal Instance(Bridge pBridge, System.Type pObjectType, System.Object pObject)
 {
     this.lBridge = pBridge;
     this.lType = pObjectType;
     this.lInstance = pObject;
 }
Example #6
0
 /// <summary>Compile the code and return an Assembly type</summary>
 /// <returns></returns>
 public NetComBridge.Assembly Compile()
 {
     if ( !Compiler.isAlreadyCompiled) {
         System.CodeDom.Compiler.CompilerResults crResults = this.provider.CompileAssemblyFromSource(this.cpParams, this.sbCode.ToString());
         if (crResults.Errors.HasErrors){
             StringBuilder sbErrors = new StringBuilder();
             foreach (System.CodeDom.Compiler.CompilerError err in crResults.Errors) {
                 sbErrors.AppendLine(System.Text.RegularExpressions.Regex.Replace( err.ToString(), @"\w:\\[^(]+", "line") );
             }
             throw new System.ApplicationException(sbErrors.ToString() );
         }else{
             System.Reflection.Assembly compiledAssembly = crResults.CompiledAssembly;
             NetComBridge.Bridge bridge = new Bridge();
             Compiler.assembly = new Assembly(bridge, compiledAssembly);
             Compiler.isAlreadyCompiled = true;
             Compiler.sbPreviousCode = this.sbCode;
             return assembly;
         }
     }else if (!Compiler.sbPreviousCode.Equals(this.sbCode)) {
         throw new ApplicationException("The code is already compiled.\r\nReopen Excel to compile again.\r\n");
     }else{
         NetComBridge.Bridge bridge = new Bridge();
         return Compiler.assembly;
     }
 }
Example #7
0
 public Type(Bridge pBridge, System.Type pType)
 {
     this.lBridge = pBridge;
     this.lType = pType;
 }
Example #8
0
 internal Assembly(Bridge pBridge, System.Reflection.Assembly pAssembly)
 {
     this.lBridge = pBridge;
     this.lAssembly = pAssembly;
 }
Example #9
0
 internal Assembly(Bridge pBridge, System.Reflection.Assembly pAssembly)
 {
     this.lBridge   = pBridge;
     this.lAssembly = pAssembly;
 }