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


C# RawComment类代码示例

本文整理汇总了C#中RawComment的典型用法代码示例。如果您正苦于以下问题:C# RawComment类的具体用法?C# RawComment怎么用?C# RawComment使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


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

示例1: __CopyValue

 private static RawComment.Internal* __CopyValue(RawComment.Internal native)
 {
     var ret = Marshal.AllocHGlobal(64);
     CppSharp.Parser.AST.RawComment.Internal.cctor_2(ret, new global::System.IntPtr(&native));
     return (RawComment.Internal*) ret;
 }
开发者ID:RainsSoft,项目名称:CppSharp,代码行数:6,代码来源:AST.cs

示例2: RawComment

 protected RawComment(RawComment.Internal* native, bool skipVTables = false)
 {
     if (native == null)
         return;
     __Instance = new global::System.IntPtr(native);
 }
开发者ID:CSRedRat,项目名称:CppSharp,代码行数:6,代码来源:AST.cs

示例3: __CreateInstance

 public static RawComment __CreateInstance(RawComment.Internal native)
 {
     return new RawComment(native);
 }
开发者ID:RainsSoft,项目名称:CppSharp,代码行数:4,代码来源:AST.cs

示例4: __CreateInstance

 public static RawComment __CreateInstance(RawComment.Internal native, bool skipVTables = false)
 {
     return new RawComment(native, skipVTables);
 }
开发者ID:CSRedRat,项目名称:CppSharp,代码行数:4,代码来源:AST.cs

示例5: DocumentProperty

        public void DocumentProperty(Property property)
        {
            var expansions = property.Namespace.PreprocessedEntities.OfType<MacroExpansion>();

            var properties = expansions.Where(e => e.Text.Contains("Q_PROPERTY") || e.Text.Contains("QDOC_PROPERTY"));
            string alternativeName = property.Name.Length == 1 ? property.Name :
                                     "is" + StringHelpers.UppercaseFirst(property.Name);
            foreach (var macroExpansion in properties)
            {
                var name = macroExpansion.Text.Split(' ')[1];
                if (name == property.Name || name == alternativeName)
                {
                    property.LineNumberStart = macroExpansion.LineNumberStart;
                    property.LineNumberEnd = macroExpansion.LineNumberEnd;
                    property.Name = name;
                    this.DocumentQtProperty(property);
                    return;
                }
            }
            if (property.Field == null)
            {
                var comment = new RawComment();
                var getter = property.GetMethod;
                if (getter.Comment == null && getter.Namespace.OriginalName == property.Namespace.OriginalName)
                {
                    this.DocumentFunction(getter);
                }
                if (getter.Comment != null)
                {
                    comment.BriefText = getter.Comment.BriefText;
                }
                var setter = property.SetMethod;
                if (setter != null)
                {
                    if (setter.Comment == null && setter.Namespace.OriginalName == property.Namespace.OriginalName)
                    {
                        this.DocumentFunction(setter);
                    }
                    if (setter.Comment != null)
                    {
                        if (property.IsOverride)
                        {
                            comment.BriefText = ((Class) property.Namespace).GetBaseProperty(property).Comment.BriefText;
                        }
                        if (!string.IsNullOrEmpty(comment.BriefText))
                        {
                            comment.BriefText += Environment.NewLine;
                        }
                        comment.BriefText += setter.Comment.BriefText;
                    }
                }
                if (!string.IsNullOrEmpty(comment.BriefText))
                {
                    property.Comment = comment;
                }
            }
            else
            {
                property.LineNumberStart = property.Field.LineNumberStart;
                property.LineNumberEnd = property.Field.LineNumberEnd;
                this.DocumentVariable(property);
            }
        }
开发者ID:nanox,项目名称:QtSharp,代码行数:63,代码来源:Documentation.cs

示例6: __CopyValue

 private static void* __CopyValue(RawComment.__Internal native)
 {
     var ret = Marshal.AllocHGlobal(56);
     global::CppSharp.Parser.AST.RawComment.__Internal.cctor_1(ret, new global::System.IntPtr(&native));
     return ret.ToPointer();
 }
开发者ID:ddobrev,项目名称:CppSharp,代码行数:6,代码来源:CppSharp.CppParser.cs

示例7: RawComment

 internal RawComment(RawComment.Internal native)
     : this(&native)
 {
 }
开发者ID:kidleon,项目名称:CppSharp,代码行数:4,代码来源:AST.cs

示例8: GenerateInlineSummary

        public void GenerateInlineSummary(RawComment comment)
        {
            if (comment == null) return;

            if (String.IsNullOrWhiteSpace(comment.BriefText))
                return;

            PushBlock(BlockKind.InlineComment);
            WriteLine("/// <summary> {0} </summary>", comment.BriefText);
            PopBlock();
        }
开发者ID:daxiazh,项目名称:CppSharp,代码行数:11,代码来源:CLITextTemplate.cs

示例9: RawComment

 private RawComment(RawComment.Internal native)
     : this(__CopyValue(native))
 {
     __ownsNativeInstance = true;
 }
开发者ID:KonajuGames,项目名称:CppSharp,代码行数:5,代码来源:AST.cs

示例10: RawComment

 internal RawComment(RawComment.Internal native)
     : this(__CopyValue(native))
 {
 }
开发者ID:vovkasm,项目名称:CppSharp,代码行数:4,代码来源:AST.cs

示例11: VisitProperty

 public override bool VisitProperty(Property property)
 {
     if (!base.VisitProperty(property) || property.TranslationUnit.IsSystemHeader)
     {
         return false;
     }
     if (!property.IsSynthetized && property.IsGenerated)
     {
         foreach (var @class in from m in new[] { property.GetMethod, property.SetMethod }
                                where m != null
                                let @class = m.OriginalNamespace as Class
                                where @class != null && @class.IsInterface
                                select @class)
         {
             RawComment comment = null;
             if (property.GetMethod != null && functionsComments.ContainsKey(property.GetMethod.Mangled))
             {
                 comment = new RawComment { BriefText = functionsComments[property.GetMethod.Mangled] };
             }
             if (comment == null && property.SetMethod != null && functionsComments.ContainsKey(property.SetMethod.Mangled))
             {
                 comment = new RawComment { BriefText = functionsComments[property.SetMethod.Mangled] };
             }
             property.Comment = comment;
             if (property.Comment != null)
             {
                 return true;
             }
         }
         this.documentation.DocumentProperty(property);
         if (property.Comment != null)
         {
             if (property.GetMethod != null)
             {
                 functionsComments[property.GetMethod.Mangled] = property.Comment.BriefText;
             }
             else
             {
                 if (property.SetMethod != null)
                 {
                     functionsComments[property.SetMethod.Mangled] = property.Comment.BriefText;
                 }
             }
         }
         return true;
     }
     return false;
 }
开发者ID:grbd,项目名称:QtSharp,代码行数:48,代码来源:GetCommentsFromQtDocsPass.cs

示例12: DocumentProperty

        public void DocumentProperty(Property property)
        {
            var expansions = property.Namespace.PreprocessedEntities.OfType<MacroExpansion>();

            var properties = expansions.Where(e => e.Text.Contains("Q_PROPERTY") || e.Text.Contains("QDOC_PROPERTY"));
            string alternativeName = property.Name.Length == 1 ? property.Name :
                                     "is" + StringHelpers.UppercaseFirst(property.Name);
            foreach (string name in from macroExpansion in properties
                                    let name = macroExpansion.Text.Split(new[] { ' ' })[1]
                                    where name == property.Name || name == alternativeName
                                    select name)
            {
                property.Name = name;
                this.DocumentQtProperty(property);
                return;
            }
            if (property.Field == null)
            {
                Method getter = property.GetMethod;
                if (getter.Comment == null)
                {
                    this.DocumentFunction(getter);
                }
                var comment = new RawComment();
                if (getter.Comment != null)
                {
                    comment.BriefText = getter.Comment.BriefText;
                }
                Method setter = property.SetMethod;
                if (setter != null)
                {
                    if (setter.Comment == null)
                    {
                        this.DocumentFunction(setter);
                    }
                    if (setter.Comment != null)
                    {
                        if (!string.IsNullOrEmpty(comment.BriefText))
                        {
                            comment.BriefText += Environment.NewLine;
                        }
                        comment.BriefText += setter.Comment.BriefText;
                    }
                }
                if (!string.IsNullOrEmpty(comment.BriefText))
                {
                    property.Comment = comment;
                }
            }
        }
开发者ID:RodolpheFouquet,项目名称:QtSharp,代码行数:50,代码来源:Documentation.cs

示例13: RawComment

 private RawComment(RawComment.Internal native)
     : this(__CopyValue(native))
 {
     __ownsNativeInstance = true;
     NativeToManagedMap[__Instance] = this;
 }
开发者ID:RainsSoft,项目名称:CppSharp,代码行数:6,代码来源:AST.cs

示例14: GenerateProperty

 private static void GenerateProperty(DeclarationContext context, Method getter, Method setter = null)
 {
     Class type = (Class) context;
     if (type.Properties.All(p => getter.Name != p.Name ||
             p.ExplicitInterfaceImpl != getter.ExplicitInterfaceImpl))
     {
         Property property = new Property();
         property.Name = GetPropertyName(getter.Name);
         property.Namespace = type;
         property.QualifiedType = getter.OriginalReturnType;
         if (getter.IsOverride || (setter != null && setter.IsOverride))
         {
             Property baseVirtualProperty = type.GetRootBaseProperty(property);
             if (baseVirtualProperty.SetMethod == null)
                 setter = null;
         }
         property.GetMethod = getter;
         property.SetMethod = setter;
         property.ExplicitInterfaceImpl = getter.ExplicitInterfaceImpl;
         if (property.ExplicitInterfaceImpl == null && setter != null)
         {
             property.ExplicitInterfaceImpl = setter.ExplicitInterfaceImpl;
         }
         if (getter.Comment != null)
         {
             var comment = new RawComment();
             comment.Kind = getter.Comment.Kind;
             comment.BriefText = getter.Comment.BriefText;
             comment.Text = getter.Comment.Text;
             comment.FullComment = new FullComment();
             comment.FullComment.Blocks.AddRange(getter.Comment.FullComment.Blocks);
             if (setter != null && setter.Comment != null)
             {
                 comment.BriefText += Environment.NewLine + setter.Comment.BriefText;
                 comment.Text += Environment.NewLine + setter.Comment.Text;
                 comment.FullComment.Blocks.AddRange(setter.Comment.FullComment.Blocks);
             }
             property.Comment = comment;
         }
         type.Properties.Add(property);
         getter.IsGenerated = false;
         if (setter != null)
             setter.IsGenerated = false;
     }
 }
开发者ID:jijamw,项目名称:CppSharp,代码行数:45,代码来源:GetterSetterToPropertyAdvancedPass.cs

示例15: CombineComments

 private static RawComment CombineComments(Declaration getter, Declaration setter)
 {
     var comment = new RawComment
     {
         Kind = getter.Comment.Kind,
         BriefText = getter.Comment.BriefText,
         Text = getter.Comment.Text
     };
     if (getter.Comment.FullComment != null)
     {
         comment.FullComment = new FullComment();
         comment.FullComment.Blocks.AddRange(getter.Comment.FullComment.Blocks);
         if (setter != null && setter.Comment != null)
         {
             comment.BriefText += Environment.NewLine + setter.Comment.BriefText;
             comment.Text += Environment.NewLine + setter.Comment.Text;
             comment.FullComment.Blocks.AddRange(setter.Comment.FullComment.Blocks);
         }
     }
     return comment;
 }
开发者ID:daxiazh,项目名称:CppSharp,代码行数:21,代码来源:GetterSetterToPropertyAdvancedPass.cs


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