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; }
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; }
internal Instance(Bridge pBridge) { this.lBridge = pBridge; }
internal Instance(Bridge pBridge, System.Object pObject) { this.lBridge = pBridge; if(pObject!=null) this.lType = pObject.GetType(); this.lInstance = pObject; }
internal Instance(Bridge pBridge, System.Type pObjectType, System.Object pObject) { this.lBridge = pBridge; this.lType = pObjectType; this.lInstance = pObject; }
/// <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; } }
public Type(Bridge pBridge, System.Type pType) { this.lBridge = pBridge; this.lType = pType; }
internal Assembly(Bridge pBridge, System.Reflection.Assembly pAssembly) { this.lBridge = pBridge; this.lAssembly = pAssembly; }