Inheritance: SDMember
コード例 #1
1
ファイル: PropertyParser.cs プロジェクト: Geaz/sharpDox
        private SDProperty GetParsedProperty(IPropertySymbol property)
        {
            var syntaxReference = property.DeclaringSyntaxReferences.Any() ? property.DeclaringSyntaxReferences.Single() : null;
            var sdProperty = new SDProperty(property.GetIdentifier())
            {
                Name = property.Name,
                DeclaringType = _typeRefParser.GetParsedTypeReference(property.ContainingType),
                Accessibility = property.DeclaredAccessibility.ToString().ToLower(),
                ReturnType = _typeRefParser.GetParsedTypeReference(property.Type),
                CanGet = property.GetMethod != null,
                CanSet = property.SetMethod != null,
                IsAbstract = property.IsAbstract,
                IsVirtual = property.IsVirtual,
                IsOverride = property.IsOverride,
                Documentations = DocumentationParser.ParseDocumentation(property),
                Region = syntaxReference != null ? new SDRegion
                {
                    Start = syntaxReference.Span.Start,
                    End = syntaxReference.Span.End,
                    StartLine = syntaxReference.SyntaxTree.GetLineSpan(syntaxReference.Span).StartLinePosition.Line + 1,
                    EndLine = syntaxReference.SyntaxTree.GetLineSpan(syntaxReference.Span).EndLinePosition.Line + 1,
                    FilePath = syntaxReference.SyntaxTree.FilePath,
                    Filename = Path.GetFileName(syntaxReference.SyntaxTree.FilePath)
                } : null
            };

            ParserOptions.SDRepository.AddMember(sdProperty);
            return sdProperty;
        }
コード例 #2
0
ファイル: PropertyViewModel.cs プロジェクト: llenroc/sharpDox
 public PropertyViewModel(SDProperty property, TypeViewModel parent, ICoreConfigSection sharpDoxConfig)
     : base(property.Identifier, parent, sharpDoxConfig)
 {
     Text = property.Name;
     Accessibility = property.Accessibility;
     Image = string.Format("pack://application:,,,/SharpDox.GUI;component/Resources/Icons/Properties_{0}.png", Accessibility);
 }
コード例 #3
0
 public PropertyViewModel(SDProperty property, TypeViewModel parent, ObservableCollection<string> excludedIdentifiers)
     : base(property.Identifier, parent, excludedIdentifiers)
 {
     Text = property.Name;
     Accessibility = property.Accessibility;
     Image = string.Format("pack://application:,,,/SharpDox.Resources;component/Icons/Properties_{0}.png", Accessibility);
 }
コード例 #4
0
ファイル: PropertyParser.cs プロジェクト: llenroc/sharpDox
        private SDProperty GetParsedProperty(IProperty property)
        {
            var sdProperty = new SDProperty(property.GetIdentifier())
            {
                Name = property.Name,
                DeclaringType = _typeParser.GetParsedType(property.DeclaringType),
                Accessibility = property.Accessibility.ToString().ToLower(),
                ReturnType = _typeParser.GetParsedType(property.ReturnType),
                CanGet = property.CanGet,
                CanSet = property.CanSet,
                IsAbstract = property.IsAbstract,
                IsVirtual = property.IsVirtual,
                IsOverride = property.IsOverride,
                Documentations = _documentationParser.ParseDocumentation(property)
            };

            _repository.AddMember(sdProperty);
            return sdProperty;
        }
コード例 #5
0
ファイル: PropertyParser.cs プロジェクト: Geaz/sharpDox
        private SDProperty GetParsedProperty(IPropertySymbol property)
        {
            var sdProperty = new SDProperty(property.GetIdentifier())
            {
                Name = property.Name,
                DeclaringType = _typeRefParser.GetParsedTypeReference(property.ContainingType),
                Accessibility = property.DeclaredAccessibility.ToString().ToLower(),
                ReturnType = _typeRefParser.GetParsedTypeReference(property.Type),
                CanGet = property.GetMethod != null,
                CanSet = property.SetMethod != null,
                IsAbstract = property.IsAbstract,
                IsVirtual = property.IsVirtual,
                IsOverride = property.IsOverride,
                Documentations = DocumentationParser.ParseDocumentation(property)
            };

            ParserOptions.SDRepository.AddMember(sdProperty);
            return sdProperty;
        }