Beispiel #1
0
        public static ConversionOperatorDeclarationSyntax ConversionOperatorDeclaration(IEnumerable<AttributeListSyntax> attributeLists = null, Modifiers modifiers = default(Modifiers), ImplicitOrExplicit kind = default(ImplicitOrExplicit), string type = null, ParameterListSyntax parameterList = null, BlockSyntax body = null)
        {
            var result = new ConversionOperatorDeclarationSyntax();

            if (attributeLists != null)
                result.AttributeLists.AddRange(attributeLists);
            result.Modifiers = modifiers;
            result.Kind = kind;
            if (type != null)
                result.Type = ParseName(type);
            result.ParameterList = parameterList;
            result.Body = body;

            return result;
        }
Beispiel #2
0
        public static ConversionOperatorDeclarationSyntax ConversionOperatorDeclaration(ImplicitOrExplicit kind = default(ImplicitOrExplicit), string type = null)
        {
            var result = new ConversionOperatorDeclarationSyntax();

            result.Kind = kind;
            if (type != null)
                result.Type = ParseName(type);

            return result;
        }
Beispiel #3
0
        public static ConversionOperatorDeclarationSyntax ConversionOperatorDeclaration(ImplicitOrExplicit kind = default(ImplicitOrExplicit), TypeSyntax type = null)
        {
            var result = new ConversionOperatorDeclarationSyntax();

            result.Kind = kind;
            result.Type = type;

            return result;
        }