Inheritance: SDMember
示例#1
1
        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
 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
        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
        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;
        }