當前位置: 首頁>>代碼示例>>C#>>正文


C# ASTContext.SetMethodParameterUsage方法代碼示例

本文整理匯總了C#中ASTContext.SetMethodParameterUsage方法的典型用法代碼示例。如果您正苦於以下問題:C# ASTContext.SetMethodParameterUsage方法的具體用法?C# ASTContext.SetMethodParameterUsage怎麽用?C# ASTContext.SetMethodParameterUsage使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在ASTContext的用法示例。


在下文中一共展示了ASTContext.SetMethodParameterUsage方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。

示例1: Preprocess

 public override void Preprocess(Driver driver, ASTContext ctx)
 {
     ctx.SetClassAsValueType("Bar");
     ctx.SetClassAsValueType("Bar2");
     ctx.SetMethodParameterUsage("Hello", "TestPrimitiveOut", 1, ParameterUsage.Out);
     ctx.SetMethodParameterUsage("Hello", "TestPrimitiveOutRef", 1, ParameterUsage.Out);
 }
開發者ID:kidleon,項目名稱:CppSharp,代碼行數:7,代碼來源:Basic.cs

示例2: Preprocess

        public void Preprocess(Driver driver, ASTContext ctx)
        {
            ctx.IgnoreHeadersWithName("lldb/lldb-forward.h");
            ctx.IgnoreHeadersWithName("lldb/API/SBDefines.h");

            ctx.SetMethodParameterUsage("lldb::SBTarget", "Launch", 2, 2, ParameterUsage.Out);
            ctx.SetMethodParameterUsage("lldb::SBTarget", "Launch", 10, 10, ParameterUsage.Out);

            ctx.RemoveEnumItemsPrefix("lldb::StateType", "eState");
            ctx.RemoveEnumItemsPrefix("lldb::LaunchFlags", "eLaunchFlag");
            ctx.RemoveEnumItemsPrefix("lldb::RunMode", "e");
            ctx.RemoveEnumItemsPrefix("lldb::ExpressionResults", "eExpression");
            ctx.RemoveEnumItemsPrefix("lldb::SymbolContextItem", "eSymbolContext");
            ctx.RemoveEnumItemsPrefix("lldb::InputReaderAction", "eInputReader");
            ctx.RemoveEnumItemsPrefix("lldb::DynamicValueType", "e");
            ctx.RemoveEnumItemsPrefix("lldb::InputReaderAction", "eInputReader");
            ctx.RemoveEnumItemsPrefix("lldb::AccessType", "eAccess");
            ctx.RemoveEnumItemsPrefix("lldb::CommandArgumentType", "eArgType");
            ctx.RemoveEnumItemsPrefix("lldb::EmulateInstructionOptions", "eEmulateInstructionOption");
            ctx.RemoveEnumItemsPrefix("lldb::TypeOptions", "eTypeOption");
            ctx.RemoveEnumItemsPrefix("lldb::FrameComparison", "eFrameCompare");
            ctx.RemoveEnumItemsPrefix("lldb::ExpressionEvaluationPhase", "eExpressionEvaluation");
            ctx.RemoveEnumItemsPrefix("lldb::TypeFlags", "eType");
            ctx.RemoveEnumItemsPrefix("lldb::CommandFlags", "eCommand");
            ctx.RemoveEnumItemsPrefix("lldb::TypeSummaryCapping", "eTypeSummary");

            ctx.SetNameOfClassMethod("lldb::SBError", "GetError", "GetErrorCode");
            ctx.SetNameOfClassMethod("lldb::SBValue", "GetValue", "GetValueAsString");

            ctx.GenerateEnumFromMacros("BreakpointId", "LLDB_BREAK_*", "LLDB_INVALID_BREAK_ID",
                "LLDB_DEFAULT_BREAK_SIZE");
            ctx.GenerateEnumFromMacros("WatchpointId", "LLDB_WATCH_*", "LLDB_INVALID_WATCH_ID");
            ctx.GenerateEnumFromMacros("GenericRegister", "LLDB_REGNUM_GENERIC_*");
            ctx.GenerateEnumFromMacros("InvalidValue", "LLDB_INVALID_*");
            ctx.GenerateEnumFromMacros("CPUType", "LLDB_ARCH_*", "LLDB_INVALID_CPUTYPE");
            ctx.GenerateEnumFromMacros("OptionSet", "LDB_OPT_SET_*", "LLDB_MAX_NUM_OPTION_SETS");

            ctx.RenameNamespace("lldb", "LLDB");
        }
開發者ID:tritao,項目名稱:LLDBSharp,代碼行數:39,代碼來源:LLDBSharpGen.cs

示例3: Preprocess

 public override void Preprocess(Driver driver, ASTContext ctx)
 {
     driver.AddTranslationUnitPass(new GetterSetterToPropertyPass());
     ctx.SetClassAsValueType("Bar");
     ctx.SetClassAsValueType("Bar2");
     ctx.SetMethodParameterUsage("Hello", "TestPrimitiveOut", 1, ParameterUsage.Out);
     ctx.SetMethodParameterUsage("Hello", "TestPrimitiveOutRef", 1, ParameterUsage.Out);
     ctx.SetMethodParameterUsage("Hello", "TestPrimitiveInOut", 1, ParameterUsage.InOut);
     ctx.SetMethodParameterUsage("Hello", "TestPrimitiveInOutRef", 1, ParameterUsage.InOut);
     ctx.SetMethodParameterUsage("Hello", "EnumOut", 2, ParameterUsage.Out);
     ctx.SetMethodParameterUsage("Hello", "EnumOutRef", 2, ParameterUsage.Out);
 }
開發者ID:kitsilanosoftware,項目名稱:CppSharp,代碼行數:12,代碼來源:Basic.cs

示例4: Postprocess

 public void Postprocess(Driver driver, ASTContext ctx)
 {
     ctx.SetMethodParameterUsage("LLDB::Target", "ReadMemory", 4, 2, ParameterUsage.In);
 }
開發者ID:tritao,項目名稱:LLDBSharp,代碼行數:4,代碼來源:LLDBSharpGen.cs

示例5: Preprocess


//.........這裏部分代碼省略.........
            ctx.IgnoreFunctionWithName("LogCreate");

            ctx.IgnoreFunctionWithName("AllocatorAllocate");
            ctx.IgnoreFunctionWithName("AllocatorDeallocate");
            ctx.SetNameOfFunction("AllocatorReset", "AllocatorResetMemory");

            ctx.IgnoreClassWithName("StreamFuncs");
            ctx.IgnoreClassWithName("FileStream");
            ctx.SetClassAsValueType("FileWatchEvent");

            ctx.IgnoreFunctionWithPattern(".+GetType");
            ctx.IgnoreFunctionWithName("ClassGetIdMap");

            ctx.IgnoreFunctionWithName("ReflectionSetHandleContext");
            ctx.IgnoreFunctionWithName("SerializerCreateJSON");
            ctx.IgnoreFunctionWithName("SerializerCreateBinary");
            ctx.IgnoreClassWithName("ReflectionContext");
            ctx.IgnoreClassWithName("ValueContext");

            ctx.SetClassAsValueType("ExtensionMetadata");

            ctx.IgnoreClassWithName("MemoryStream");
            ctx.IgnoreClassWithName("Serializer");
            ctx.IgnoreClassWithName("Thread");

            // Math
            ctx.SetClassAsValueType("ColorP");
            ctx.SetClassAsValueType("Color");
            ctx.SetClassAsValueType("Vector2P");
            ctx.SetClassAsValueType("Vector2");
            ctx.SetClassAsValueType("Vector2i");
            ctx.SetClassAsValueType("Vector3P");
            ctx.SetClassAsValueType("Vector3");
            ctx.SetClassAsValueType("Vector4");
            ctx.SetClassAsValueType("EulerAngles");
            ctx.SetClassAsValueType("QuaternionP");
            ctx.SetClassAsValueType("Quaternion");
            ctx.SetClassAsValueType("Matrix4x3");
            ctx.SetClassAsValueType("Matrix4x4");

            ctx.CopyClassFields("ColorP", "Color");
            ctx.CopyClassFields("Vector2P", "Vector2");
            ctx.CopyClassFields("Vector3P", "Vector3");
            ctx.CopyClassFields("QuaternionP", "Quaternion");

            ctx.IgnoreClassWithName("ColorP");
            ctx.IgnoreClassWithName("Vector2P");
            ctx.IgnoreClassWithName("Vector3P");
            ctx.IgnoreClassWithName("QuaternionP");

            ctx.SetNameOfClassMethod("Matrix4x3", "identity", "setIdentity");
            ctx.SetNameOfClassMethod("Matrix4x4", "identity", "setIdentity");
            ctx.SetNameOfClassMethod("Quaternion", "identity", "setIdentity");
            ctx.SetNameOfClassMethod("Vector2", "zero", "setZero");
            ctx.SetNameOfClassMethod("Vector3", "zero", "setZero");
            ctx.SetNameOfClassMethod("Vector4", "zero", "setZero");

            // Resources
            ctx.IgnoreFunctionWithName("ResourcesInitialize");
            ctx.IgnoreFunctionWithName("ResourcesDeinitialize");
            //lib.SetClassAsValueType("ResourceEvent");
            ctx.SetClassAsValueType("ResourceLoadOption");
            ctx.SetClassAsValueType("ResourceLoadOptions");
            ctx.SetNameOfClassMethod("Texture", "allocate", "alloc");
            ctx.ExcludeFromPass("ResourceHandleCreate", typeof (FunctionToInstanceMethodPass));

            // Set generic type constraints on template methods
            var resourceManager = ctx.FindClass("ResourceManager").FirstOrDefault();
            if (resourceManager != null)
                foreach (var template in resourceManager.Templates)
                {
                    for (var i = 0; i < template.Parameters.Count; ++i)
                    {
                        var param = template.Parameters[i];
                        param.Constraint = "Flood::Resource";
                        template.Parameters[i] = param;
                    }
                }

            // Graphics
            ctx.SetClassAsValueType("RenderContextSettings");
            ctx.SetClassAsValueType("RenderBatchRange");
            ctx.SetClassAsValueType("VertexElementP");
            ctx.SetClassAsValueType("VertexElement");
            ctx.SetClassAsValueType("UniformBufferElement");
            ctx.SetClassAsValueType("RenderState");
            ctx.SetClassAsValueType("LightState");
            ctx.IgnoreHeadersWithName("MaxRectsBinPack.h");
            ctx.IgnoreClassWithName("MaxRectsBinPack");
            ctx.IgnoreClassWithName("CompareHandle");
            ctx.SetClassAsValueType("Glyph");
            ctx.SetClassAsValueType("Rectangle");
            ctx.SetClassAsValueType("RectangleF");
            ctx.SetClassAsValueType("SubTexture");
            ctx.SetMethodParameterUsage("TextureAtlas", "getImageSubTexture", 2, ParameterUsage.Out);
            ctx.SetMethodParameterUsage("Font", "getGlyphInfo", 3, ParameterUsage.Out);

            // Engine
            ctx.IgnoreClassMethodWithName("Engine", "addSubsystem");
        }
開發者ID:FloodProject,項目名稱:flood,代碼行數:101,代碼來源:Flood.cs


注:本文中的ASTContext.SetMethodParameterUsage方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。