예제 #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;
 }
예제 #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;
 }
예제 #3
0
 internal Instance(Bridge pBridge)
 {
     this.lBridge = pBridge;
 }
예제 #4
0
 internal Instance(Bridge pBridge, System.Object pObject)
 {
     this.lBridge = pBridge;
     if(pObject!=null) this.lType = pObject.GetType();
     this.lInstance = pObject;
 }
예제 #5
0
 internal Instance(Bridge pBridge, System.Type pObjectType, System.Object pObject)
 {
     this.lBridge = pBridge;
     this.lType = pObjectType;
     this.lInstance = pObject;
 }
예제 #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;
     }
 }
예제 #7
0
 public Type(Bridge pBridge, System.Type pType)
 {
     this.lBridge = pBridge;
     this.lType = pType;
 }
예제 #8
0
 internal Assembly(Bridge pBridge, System.Reflection.Assembly pAssembly)
 {
     this.lBridge = pBridge;
     this.lAssembly = pAssembly;
 }
예제 #9
0
 internal Assembly(Bridge pBridge, System.Reflection.Assembly pAssembly)
 {
     this.lBridge   = pBridge;
     this.lAssembly = pAssembly;
 }