示例#1
0
 private static bool IsRelevant(
     NamedSyntaxNode typeDefinition,
     Context context)
 {
     return(!context.SourceSchema.HasValue ||
            typeDefinition.IsFromSchema(context.SourceSchema.Value));
 }
示例#2
0
        public static NameString CreateUniqueName(
            this ITypeInfo typeInfo,
            NamedSyntaxNode namedSyntaxNode)
        {
            if (typeInfo == null)
            {
                throw new ArgumentNullException(nameof(typeInfo));
            }

            if (namedSyntaxNode == null)
            {
                throw new ArgumentNullException(nameof(namedSyntaxNode));
            }

            return($"{typeInfo.Schema.Name}_{namedSyntaxNode.Name.Value}");
        }