当前位置: 首页>>代码示例>>C#>>正文


C# Assembly.notNull方法代码示例

本文整理汇总了C#中System.Reflection.Assembly.notNull方法的典型用法代码示例。如果您正苦于以下问题:C# Assembly.notNull方法的具体用法?C# Assembly.notNull怎么用?C# Assembly.notNull使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在System.Reflection.Assembly的用法示例。


在下文中一共展示了Assembly.notNull方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: injectIntoProcess

		public bool injectIntoProcess(Process process, bool x64, bool runtime40, Assembly assemblyToExecute)
		{
			if (assemblyToExecute.notNull())
			{				
				var className = "O2.Script.Test"; //"Snoop.SnoopUI";
				var methodName = "GoBabyGo";
				return injectIntoProcess(process, assemblyToExecute.Location, className, methodName, x64, runtime40);
			}
			return false;
		}
开发者ID:CallMeSteve,项目名称:O2.Platform.Scripts,代码行数:10,代码来源:API_O2_Injector.cs

示例2: copy_To_Bin_Folder

 /// <summary>
 /// Copies the provided assemblies into the provided AppDomain's bin folder
 /// 
 /// Returns the path to the assembly in the AppDomain bin folder
 /// 
 /// Note that this does NOT overide the assembly if it already existed
 /// </summary>
 /// <param name="appDomain"></param>
 /// <param name="assembly"></param>
 /// <returns></returns>
 public static string copy_To_Bin_Folder(this AppDomain appDomain, Assembly assembly)
 {
     if (appDomain.notNull() && assembly.notNull())
     {
         var assemblyLocation = assembly.location();
         if (assemblyLocation.fileExists())
         {
             var targetFile = appDomain.binFolder().mapPath(assemblyLocation.fileName());
             if(targetFile.file_Doesnt_Exist())
                 assemblyLocation.file_Copy(targetFile);
             if(targetFile.file_Exists())
                 return targetFile;
         }
     }
     return null;;
 }
开发者ID:njmube,项目名称:FluentSharp,代码行数:26,代码来源:AppDomain_ExtensionMethods.cs

示例3: load_Wsdl_From_Assembly

		public void load_Wsdl_From_Assembly(Assembly wsdlAssembly)
		{
			if (wsdlAssembly.notNull())
			{
				Methods_TreeView.clear();
				"Loading Wsdl from Assembly: {0} at {1}".info(wsdlAssembly.str() , wsdlAssembly.Location);
				WsdlAssembly = wsdlAssembly;
				var soapMethods = WsdlAssembly.webService_SoapMethods();
				"Found {0} Web Service methods:{0}".info(soapMethods.size());					
				Methods_TreeView.add_Nodes(soapMethods, (method)=> ((this.ShowFullMethodSignatures) 
																		? method.str()
																		: method.Name));
				Methods_TreeView.selectFirst();
			}
			else
				"Provided Assembly was null".error();
			markGuiAs_OK();
		}	
开发者ID:jobyjames85,项目名称:O2.Platform.Scripts,代码行数:18,代码来源:ascx_WSDL_Creation_and_Execution.cs

示例4: setCachedCompiledAssembly

 public static void setCachedCompiledAssembly(string key, Assembly compiledAssembly)
 {
     if (key.valid() && 
         compiledAssembly.notNull() && 
         compiledAssembly.Location.valid() &&
         compiledAssembly.Location.fileExists())
     {                                            
         CachedCompiledAssemblies.add(key, compiledAssembly.Location);
         saveCachedCompiledAssembliesMappings();                
     }
 }
开发者ID:pusp,项目名称:o2platform,代码行数:11,代码来源:CompileEngine.cs

示例5: setCachedCompiledAssembly

 public static void setCachedCompiledAssembly(string key, Assembly compiledAssembly, bool triggerSave = false)
 {
     if (key.valid() &&
         compiledAssembly.notNull() &&
         compiledAssembly.Location.valid() &&
         compiledAssembly.Location.fileExists())
     {
         needCachedCompiledAssembliesSave = true;
         CachedCompiledAssemblies.add(key, compiledAssembly.Location);
         CachedCompiledAssemblies.add(compiledAssembly.GetName().Name, compiledAssembly.Location);
         CachedCompiledAssemblies.add(compiledAssembly.str(), compiledAssembly.Location);
         if (triggerSave)
             saveCachedCompiledAssembliesMappings();
     }
 }
开发者ID:SergeTruth,项目名称:OxyChart,代码行数:15,代码来源:CompileEngine.cs

示例6: compileCSSharpFile

        public Assembly compileCSSharpFile()
        {
            enableCodeComplete();
            compiledAssembly = null;
            var compileEngine = new CompileEngine();
            if (getSourceCode() != "")
            {
                saveSourceCode();
                // always save before compiling
                compileEngine.compileSourceFile(sPathToFileLoaded);
                compiledAssembly = compileEngine.compiledAssembly;
                if (compiledAssembly.notNull() && o2CodeCompletion.notNull() && compileEngine.cpCompilerParameters.notNull())
                    o2CodeCompletion.addReferences(compileEngine.cpCompilerParameters.ReferencedAssemblies.toList());
            }

            var state = compiledAssembly == null && compileEngine.sbErrorMessage != null;
            //btShowHideCompilationErrors.visible(state);
            //btShowHideCompilationErrors.prop("Visible",state);
            btShowHideCompilationErrors.visible(state);
            tvCompilationErrors.visible(state);
            lbCompilationErrors.visible(state);
            //lbCompilationErrors.prop("Visible", state);

            clearBookmarksAndMarkers();
            // if there isn't a compiledAssembly, show errors
            if (compiledAssembly == null)
            {
                CompileEngine_WinForms.addErrorsListToTreeView(tvCompilationErrors, compileEngine.sbErrorMessage);
                showErrorsInSourceCodeEditor(compileEngine.sbErrorMessage.str());
            }
             /*   else
            {
                if (compiledFileAstData.notNull())
                    compiledFileAstData.Dispose();
                compiledFileAstData = new O2MappedAstData(sPathToFileLoaded);
            }*/

            return compiledAssembly;
        }
开发者ID:sempf,项目名称:FluentSharp,代码行数:39,代码来源:ascx_SourceCodeEditor.Controllers.cs


注:本文中的System.Reflection.Assembly.notNull方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。