mirror of https://github.com/mono/CppSharp.git
13 changed files with 581 additions and 467 deletions
@ -1,386 +1,394 @@ |
|||||||
using System; |
using System; |
||||||
using System.Collections.Generic; |
using System.Collections.Generic; |
||||||
using CppSharp.AST; |
using CppSharp.AST; |
||||||
using CppSharp.AST.Extensions; |
using CppSharp.AST.Extensions; |
||||||
using CppSharp.Types; |
using CppSharp.Types; |
||||||
using Type = CppSharp.AST.Type; |
using Type = CppSharp.AST.Type; |
||||||
|
|
||||||
namespace CppSharp.Generators.CLI |
namespace CppSharp.Generators.CLI |
||||||
{ |
{ |
||||||
public class CLITypePrinterContext : TypePrinterContext |
public class CLITypePrinterContext : TypePrinterContext |
||||||
{ |
{ |
||||||
public CLITypePrinterContext() |
public CLITypePrinterContext() |
||||||
{ |
{ |
||||||
|
|
||||||
} |
} |
||||||
|
|
||||||
public CLITypePrinterContext(TypePrinterContextKind kind) |
public CLITypePrinterContext(TypePrinterContextKind kind) |
||||||
: base(kind) |
: base(kind) |
||||||
{ |
{ |
||||||
} |
} |
||||||
} |
} |
||||||
|
|
||||||
public class CLITypePrinter : ITypePrinter<string>, IDeclVisitor<string> |
public class CLITypePrinter : ITypePrinter<string>, IDeclVisitor<string> |
||||||
{ |
{ |
||||||
public Driver Driver { get; set; } |
public Driver Driver { get; set; } |
||||||
public CLITypePrinterContext Context { get; set; } |
public CLITypePrinterContext Context { get; set; } |
||||||
|
|
||||||
readonly ITypeMapDatabase TypeMapDatabase; |
readonly ITypeMapDatabase TypeMapDatabase; |
||||||
readonly DriverOptions Options; |
readonly DriverOptions Options; |
||||||
|
|
||||||
public CLITypePrinter(Driver driver) |
public CLITypePrinter(Driver driver) |
||||||
{ |
{ |
||||||
Driver = driver; |
Driver = driver; |
||||||
TypeMapDatabase = driver.TypeDatabase; |
TypeMapDatabase = driver.TypeDatabase; |
||||||
Options = driver.Options; |
Options = driver.Options; |
||||||
Context = new CLITypePrinterContext(); |
Context = new CLITypePrinterContext(); |
||||||
} |
} |
||||||
|
|
||||||
public CLITypePrinter(Driver driver, CLITypePrinterContext context) |
public CLITypePrinter(Driver driver, CLITypePrinterContext context) |
||||||
: this(driver) |
: this(driver) |
||||||
{ |
{ |
||||||
Context = context; |
Context = context; |
||||||
} |
} |
||||||
|
|
||||||
public string VisitTagType(TagType tag, TypeQualifiers quals) |
public string VisitTagType(TagType tag, TypeQualifiers quals) |
||||||
{ |
{ |
||||||
TypeMap typeMap = null; |
TypeMap typeMap = null; |
||||||
if (TypeMapDatabase.FindTypeMap(tag, out typeMap)) |
if (TypeMapDatabase.FindTypeMap(tag, out typeMap)) |
||||||
{ |
{ |
||||||
typeMap.Type = tag; |
typeMap.Type = tag; |
||||||
Context.Type = tag; |
Context.Type = tag; |
||||||
return typeMap.CLISignature(Context); |
return typeMap.CLISignature(Context); |
||||||
} |
} |
||||||
|
|
||||||
Declaration decl = tag.Declaration; |
Declaration decl = tag.Declaration; |
||||||
|
|
||||||
if (decl == null) |
if (decl == null) |
||||||
return string.Empty; |
return string.Empty; |
||||||
|
|
||||||
return VisitDeclaration(decl, quals); |
return VisitDeclaration(decl, quals); |
||||||
} |
} |
||||||
|
|
||||||
public string VisitArrayType(ArrayType array, TypeQualifiers quals) |
public string VisitArrayType(ArrayType array, TypeQualifiers quals) |
||||||
{ |
{ |
||||||
return string.Format("cli::array<{0}>^", array.Type.Visit(this)); |
return string.Format("cli::array<{0}>^", array.Type.Visit(this)); |
||||||
} |
} |
||||||
|
|
||||||
public string VisitFunctionType(FunctionType function, TypeQualifiers quals) |
public string VisitFunctionType(FunctionType function, TypeQualifiers quals) |
||||||
{ |
{ |
||||||
var arguments = function.Parameters; |
var arguments = function.Parameters; |
||||||
var returnType = function.ReturnType; |
var returnType = function.ReturnType; |
||||||
var args = string.Empty; |
var args = string.Empty; |
||||||
|
|
||||||
if (arguments.Count > 0) |
if (arguments.Count > 0) |
||||||
args = VisitParameters(function.Parameters, hasNames: false); |
args = VisitParameters(function.Parameters, hasNames: false); |
||||||
|
|
||||||
if (returnType.Type.IsPrimitiveType(PrimitiveType.Void)) |
if (returnType.Type.IsPrimitiveType(PrimitiveType.Void)) |
||||||
{ |
{ |
||||||
if (!string.IsNullOrEmpty(args)) |
if (!string.IsNullOrEmpty(args)) |
||||||
args = string.Format("<{0}>", args); |
args = string.Format("<{0}>", args); |
||||||
return string.Format("System::Action{0}", args); |
return string.Format("System::Action{0}", args); |
||||||
} |
} |
||||||
|
|
||||||
if (!string.IsNullOrEmpty(args)) |
if (!string.IsNullOrEmpty(args)) |
||||||
args = string.Format(", {0}", args); |
args = string.Format(", {0}", args); |
||||||
|
|
||||||
return string.Format("System::Func<{0}{1}>", returnType.Visit(this), args); |
return string.Format("System::Func<{0}{1}>", returnType.Visit(this), args); |
||||||
} |
} |
||||||
|
|
||||||
public string VisitParameters(IEnumerable<Parameter> @params, |
public string VisitParameters(IEnumerable<Parameter> @params, |
||||||
bool hasNames) |
bool hasNames) |
||||||
{ |
{ |
||||||
var args = new List<string>(); |
var args = new List<string>(); |
||||||
|
|
||||||
foreach (var param in @params) |
foreach (var param in @params) |
||||||
args.Add(VisitParameter(param, hasNames)); |
args.Add(VisitParameter(param, hasNames)); |
||||||
|
|
||||||
return string.Join(", ", args); |
return string.Join(", ", args); |
||||||
} |
} |
||||||
|
|
||||||
public string VisitParameter(Parameter param, bool hasName = true) |
public string VisitParameter(Parameter param, bool hasName = true) |
||||||
{ |
{ |
||||||
Context.Parameter = param; |
Context.Parameter = param; |
||||||
var type = param.Type.Visit(this, param.QualifiedType.Qualifiers); |
var type = param.Type.Visit(this, param.QualifiedType.Qualifiers); |
||||||
Context.Parameter = null; |
Context.Parameter = null; |
||||||
|
|
||||||
var str = string.Empty; |
var str = string.Empty; |
||||||
if(param.Usage == ParameterUsage.Out) |
if(param.Usage == ParameterUsage.Out) |
||||||
str += "[System::Runtime::InteropServices::Out] "; |
str += "[System::Runtime::InteropServices::Out] "; |
||||||
|
|
||||||
str += type; |
str += type; |
||||||
|
|
||||||
if(param.Usage == ParameterUsage.Out || |
if(param.Usage == ParameterUsage.Out || |
||||||
param.Usage == ParameterUsage.InOut) |
param.Usage == ParameterUsage.InOut) |
||||||
str += "%"; |
str += "%"; |
||||||
|
|
||||||
if (hasName && !string.IsNullOrEmpty(param.Name)) |
if (hasName && !string.IsNullOrEmpty(param.Name)) |
||||||
str += " " + param.Name; |
str += " " + param.Name; |
||||||
|
|
||||||
return str; |
return str; |
||||||
} |
} |
||||||
|
|
||||||
public string VisitDelegate(FunctionType function) |
public string VisitDelegate(FunctionType function) |
||||||
{ |
{ |
||||||
return string.Format("delegate {0} {{0}}({1})", |
return string.Format("delegate {0} {{0}}({1})", |
||||||
function.ReturnType.Visit(this), |
function.ReturnType.Visit(this), |
||||||
VisitParameters(function.Parameters, hasNames: true)); |
VisitParameters(function.Parameters, hasNames: true)); |
||||||
} |
} |
||||||
|
|
||||||
public string VisitPointerType(PointerType pointer, TypeQualifiers quals) |
public string VisitPointerType(PointerType pointer, TypeQualifiers quals) |
||||||
{ |
{ |
||||||
var pointee = pointer.Pointee.Desugar(); |
var pointee = pointer.Pointee.Desugar(); |
||||||
|
|
||||||
if (pointee is FunctionType) |
if (pointee is FunctionType) |
||||||
{ |
{ |
||||||
var function = pointee as FunctionType; |
var function = pointee as FunctionType; |
||||||
return string.Format("{0}^", function.Visit(this, quals)); |
return string.Format("{0}^", function.Visit(this, quals)); |
||||||
} |
} |
||||||
|
|
||||||
if (pointee.IsPrimitiveType(PrimitiveType.Char) && quals.IsConst) |
if (pointee.IsPrimitiveType(PrimitiveType.Char) && quals.IsConst) |
||||||
{ |
{ |
||||||
return "System::String^"; |
return "System::String^"; |
||||||
} |
} |
||||||
|
|
||||||
PrimitiveType primitive; |
// From http://msdn.microsoft.com/en-us/library/y31yhkeb.aspx
|
||||||
if (pointee.IsPrimitiveType(out primitive)) |
// Any of the following types may be a pointer type:
|
||||||
{ |
// * sbyte, byte, short, ushort, int, uint, long, ulong, char, float, double, decimal, or bool.
|
||||||
var param = Context.Parameter; |
// * Any enum type.
|
||||||
if (param != null && (param.IsOut || param.IsInOut)) |
// * Any pointer type.
|
||||||
return VisitPrimitiveType(primitive); |
// * Any user-defined struct type that contains fields of unmanaged types only.
|
||||||
|
var finalPointee = pointer.GetFinalPointee(); |
||||||
return VisitPrimitiveType(primitive, quals) + "*"; |
if (finalPointee.IsPrimitiveType()) |
||||||
} |
{ |
||||||
|
// Skip one indirection if passed by reference
|
||||||
Enumeration @enum; |
var param = Context.Parameter; |
||||||
if (pointee.IsTagDecl(out @enum)) |
if (param != null && (param.IsOut || param.IsInOut) |
||||||
{ |
&& pointee == finalPointee) |
||||||
var typeName = @enum.Visit(this); |
return pointee.Visit(this, quals); |
||||||
return string.Format("{0}*", typeName); |
|
||||||
} |
return pointee.Visit(this, quals) + "*"; |
||||||
|
} |
||||||
return pointee.Visit(this, quals); |
|
||||||
} |
Enumeration @enum; |
||||||
|
if (pointee.IsTagDecl(out @enum)) |
||||||
public string VisitMemberPointerType(MemberPointerType member, |
{ |
||||||
TypeQualifiers quals) |
var typeName = @enum.Visit(this); |
||||||
{ |
return string.Format("{0}*", typeName); |
||||||
throw new NotImplementedException(); |
} |
||||||
} |
|
||||||
|
return pointee.Visit(this, quals); |
||||||
public string VisitBuiltinType(BuiltinType builtin, TypeQualifiers quals) |
} |
||||||
{ |
|
||||||
return VisitPrimitiveType(builtin.Type); |
public string VisitMemberPointerType(MemberPointerType member, |
||||||
} |
TypeQualifiers quals) |
||||||
|
{ |
||||||
public string VisitPrimitiveType(PrimitiveType primitive) |
throw new NotImplementedException(); |
||||||
{ |
} |
||||||
switch (primitive) |
|
||||||
{ |
public string VisitBuiltinType(BuiltinType builtin, TypeQualifiers quals) |
||||||
case PrimitiveType.Bool: return "bool"; |
{ |
||||||
case PrimitiveType.Void: return "void"; |
return VisitPrimitiveType(builtin.Type); |
||||||
case PrimitiveType.Char16: |
} |
||||||
case PrimitiveType.WideChar: return "System::Char"; |
|
||||||
case PrimitiveType.Int8: return Options.MarshalCharAsManagedChar ? "System::Char" : "char"; |
public string VisitPrimitiveType(PrimitiveType primitive) |
||||||
case PrimitiveType.UInt8: return "unsigned char"; |
{ |
||||||
case PrimitiveType.Int16: return "short"; |
switch (primitive) |
||||||
case PrimitiveType.UInt16: return "unsigned short"; |
{ |
||||||
case PrimitiveType.Int32: return "int"; |
case PrimitiveType.Bool: return "bool"; |
||||||
case PrimitiveType.UInt32: return "unsigned int"; |
case PrimitiveType.Void: return "void"; |
||||||
case PrimitiveType.Int64: return "long long"; |
case PrimitiveType.Char16: |
||||||
case PrimitiveType.UInt64: return "unsigned long long"; |
case PrimitiveType.WideChar: return "System::Char"; |
||||||
case PrimitiveType.Float: return "float"; |
case PrimitiveType.Int8: return Options.MarshalCharAsManagedChar ? "System::Char" : "char"; |
||||||
case PrimitiveType.Double: return "double"; |
case PrimitiveType.UInt8: return "unsigned char"; |
||||||
case PrimitiveType.IntPtr: return "IntPtr"; |
case PrimitiveType.Int16: return "short"; |
||||||
case PrimitiveType.UIntPtr: return "UIntPtr"; |
case PrimitiveType.UInt16: return "unsigned short"; |
||||||
} |
case PrimitiveType.Int32: return "int"; |
||||||
|
case PrimitiveType.UInt32: return "unsigned int"; |
||||||
throw new NotSupportedException(); |
case PrimitiveType.Int64: return "long long"; |
||||||
} |
case PrimitiveType.UInt64: return "unsigned long long"; |
||||||
|
case PrimitiveType.Float: return "float"; |
||||||
public string VisitTypedefType(TypedefType typedef, TypeQualifiers quals) |
case PrimitiveType.Double: return "double"; |
||||||
{ |
case PrimitiveType.IntPtr: return "IntPtr"; |
||||||
var decl = typedef.Declaration; |
case PrimitiveType.UIntPtr: return "UIntPtr"; |
||||||
|
} |
||||||
TypeMap typeMap = null; |
|
||||||
if (TypeMapDatabase.FindTypeMap(decl, out typeMap)) |
throw new NotSupportedException(); |
||||||
{ |
} |
||||||
typeMap.Type = typedef; |
|
||||||
Context.Type = typedef; |
public string VisitTypedefType(TypedefType typedef, TypeQualifiers quals) |
||||||
return typeMap.CLISignature(Context); |
{ |
||||||
} |
var decl = typedef.Declaration; |
||||||
|
|
||||||
FunctionType func; |
TypeMap typeMap = null; |
||||||
if (decl.Type.IsPointerTo<FunctionType>(out func)) |
if (TypeMapDatabase.FindTypeMap(decl, out typeMap)) |
||||||
{ |
{ |
||||||
// TODO: Use SafeIdentifier()
|
typeMap.Type = typedef; |
||||||
return string.Format("{0}^", VisitDeclaration(decl)); |
Context.Type = typedef; |
||||||
} |
return typeMap.CLISignature(Context); |
||||||
|
} |
||||||
return decl.Type.Visit(this); |
|
||||||
} |
FunctionType func; |
||||||
|
if (decl.Type.IsPointerTo<FunctionType>(out func)) |
||||||
public string VisitAttributedType(AttributedType attributed, TypeQualifiers quals) |
{ |
||||||
{ |
// TODO: Use SafeIdentifier()
|
||||||
return attributed.Modified.Visit(this); |
return string.Format("{0}^", VisitDeclaration(decl)); |
||||||
} |
} |
||||||
|
|
||||||
public string VisitDecayedType(DecayedType decayed, TypeQualifiers quals) |
return decl.Type.Visit(this); |
||||||
{ |
} |
||||||
return decayed.Decayed.Visit(this); |
|
||||||
} |
public string VisitAttributedType(AttributedType attributed, TypeQualifiers quals) |
||||||
|
{ |
||||||
public string VisitTemplateSpecializationType(TemplateSpecializationType template, |
return attributed.Modified.Visit(this); |
||||||
TypeQualifiers quals) |
} |
||||||
{ |
|
||||||
var decl = template.Template.TemplatedDecl; |
public string VisitDecayedType(DecayedType decayed, TypeQualifiers quals) |
||||||
|
{ |
||||||
TypeMap typeMap = null; |
return decayed.Decayed.Visit(this); |
||||||
if (TypeMapDatabase.FindTypeMap(template, out typeMap)) |
} |
||||||
{ |
|
||||||
typeMap.Declaration = decl; |
public string VisitTemplateSpecializationType(TemplateSpecializationType template, |
||||||
typeMap.Type = template; |
TypeQualifiers quals) |
||||||
Context.Type = template; |
{ |
||||||
return typeMap.CLISignature(Context); |
var decl = template.Template.TemplatedDecl; |
||||||
} |
|
||||||
|
TypeMap typeMap = null; |
||||||
return decl.Name; |
if (TypeMapDatabase.FindTypeMap(template, out typeMap)) |
||||||
} |
{ |
||||||
|
typeMap.Declaration = decl; |
||||||
public string VisitTemplateParameterType(TemplateParameterType param, |
typeMap.Type = template; |
||||||
TypeQualifiers quals) |
Context.Type = template; |
||||||
{ |
return typeMap.CLISignature(Context); |
||||||
return param.Parameter.Name; |
} |
||||||
} |
|
||||||
|
return decl.Name; |
||||||
public string VisitTemplateParameterSubstitutionType( |
} |
||||||
TemplateParameterSubstitutionType param, TypeQualifiers quals) |
|
||||||
{ |
public string VisitTemplateParameterType(TemplateParameterType param, |
||||||
throw new NotImplementedException(); |
TypeQualifiers quals) |
||||||
} |
{ |
||||||
|
return param.Parameter.Name; |
||||||
public string VisitInjectedClassNameType(InjectedClassNameType injected, TypeQualifiers quals) |
} |
||||||
{ |
|
||||||
throw new NotImplementedException(); |
public string VisitTemplateParameterSubstitutionType( |
||||||
} |
TemplateParameterSubstitutionType param, TypeQualifiers quals) |
||||||
|
{ |
||||||
public string VisitDependentNameType(DependentNameType dependent, TypeQualifiers quals) |
throw new NotImplementedException(); |
||||||
{ |
} |
||||||
throw new NotImplementedException(); |
|
||||||
} |
public string VisitInjectedClassNameType(InjectedClassNameType injected, TypeQualifiers quals) |
||||||
|
{ |
||||||
public string VisitPackExpansionType(PackExpansionType packExpansionType, TypeQualifiers quals) |
throw new NotImplementedException(); |
||||||
{ |
} |
||||||
return string.Empty; |
|
||||||
} |
public string VisitDependentNameType(DependentNameType dependent, TypeQualifiers quals) |
||||||
|
{ |
||||||
public string VisitCILType(CILType type, TypeQualifiers quals) |
throw new NotImplementedException(); |
||||||
{ |
} |
||||||
return type.Type.FullName.Replace(".", "::") + "^"; |
|
||||||
} |
public string VisitPackExpansionType(PackExpansionType packExpansionType, TypeQualifiers quals) |
||||||
|
{ |
||||||
public string VisitPrimitiveType(PrimitiveType type, TypeQualifiers quals) |
return string.Empty; |
||||||
{ |
} |
||||||
return VisitPrimitiveType(type); |
|
||||||
} |
public string VisitCILType(CILType type, TypeQualifiers quals) |
||||||
|
{ |
||||||
public string VisitDeclaration(Declaration decl, TypeQualifiers quals) |
return type.Type.FullName.Replace(".", "::") + "^"; |
||||||
{ |
} |
||||||
return VisitDeclaration(decl); |
|
||||||
} |
public string VisitPrimitiveType(PrimitiveType type, TypeQualifiers quals) |
||||||
|
{ |
||||||
public string VisitDeclaration(Declaration decl) |
return VisitPrimitiveType(type); |
||||||
{ |
} |
||||||
var names = new List<string>(); |
|
||||||
|
public string VisitDeclaration(Declaration decl, TypeQualifiers quals) |
||||||
if (Options.GenerateLibraryNamespace) |
{ |
||||||
names.Add(Driver.Options.OutputNamespace); |
return VisitDeclaration(decl); |
||||||
|
} |
||||||
if (!string.IsNullOrEmpty(decl.Namespace.QualifiedName)) |
|
||||||
names.Add(decl.Namespace.QualifiedName); |
public string VisitDeclaration(Declaration decl) |
||||||
|
{ |
||||||
names.Add(decl.Visit(this)); |
var names = new List<string>(); |
||||||
|
|
||||||
return string.Join("::", names); |
if (Options.GenerateLibraryNamespace) |
||||||
} |
names.Add(Driver.Options.OutputNamespace); |
||||||
|
|
||||||
public string VisitClassDecl(Class @class) |
if (!string.IsNullOrEmpty(decl.Namespace.QualifiedName)) |
||||||
{ |
names.Add(decl.Namespace.QualifiedName); |
||||||
if (@class.CompleteDeclaration != null) |
|
||||||
return VisitClassDecl(@class.CompleteDeclaration as Class); |
names.Add(decl.Visit(this)); |
||||||
|
|
||||||
return string.Format("{0}{1}", @class.Name, @class.IsRefType ? "^" |
return string.Join("::", names); |
||||||
: string.Empty); |
} |
||||||
} |
|
||||||
|
public string VisitClassDecl(Class @class) |
||||||
public string VisitFieldDecl(Field field) |
{ |
||||||
{ |
if (@class.CompleteDeclaration != null) |
||||||
throw new NotImplementedException(); |
return VisitClassDecl(@class.CompleteDeclaration as Class); |
||||||
} |
|
||||||
|
return string.Format("{0}{1}", @class.Name, @class.IsRefType ? "^" |
||||||
public string VisitFunctionDecl(Function function) |
: string.Empty); |
||||||
{ |
} |
||||||
throw new NotImplementedException(); |
|
||||||
} |
public string VisitFieldDecl(Field field) |
||||||
|
{ |
||||||
public string VisitMethodDecl(Method method) |
throw new NotImplementedException(); |
||||||
{ |
} |
||||||
throw new NotImplementedException(); |
|
||||||
} |
public string VisitFunctionDecl(Function function) |
||||||
|
{ |
||||||
public string VisitParameterDecl(Parameter parameter) |
throw new NotImplementedException(); |
||||||
{ |
} |
||||||
throw new NotImplementedException(); |
|
||||||
} |
public string VisitMethodDecl(Method method) |
||||||
|
{ |
||||||
public string VisitTypedefDecl(TypedefDecl typedef) |
throw new NotImplementedException(); |
||||||
{ |
} |
||||||
return typedef.Name; |
|
||||||
} |
public string VisitParameterDecl(Parameter parameter) |
||||||
|
{ |
||||||
public string VisitEnumDecl(Enumeration @enum) |
throw new NotImplementedException(); |
||||||
{ |
} |
||||||
return @enum.Name; |
|
||||||
} |
public string VisitTypedefDecl(TypedefDecl typedef) |
||||||
|
{ |
||||||
public string VisitVariableDecl(Variable variable) |
return typedef.Name; |
||||||
{ |
} |
||||||
throw new NotImplementedException(); |
|
||||||
} |
public string VisitEnumDecl(Enumeration @enum) |
||||||
|
{ |
||||||
public string VisitClassTemplateDecl(ClassTemplate template) |
return @enum.Name; |
||||||
{ |
} |
||||||
throw new NotImplementedException(); |
|
||||||
} |
public string VisitVariableDecl(Variable variable) |
||||||
|
{ |
||||||
public string VisitFunctionTemplateDecl(FunctionTemplate template) |
throw new NotImplementedException(); |
||||||
{ |
} |
||||||
throw new NotImplementedException(); |
|
||||||
} |
public string VisitClassTemplateDecl(ClassTemplate template) |
||||||
|
{ |
||||||
public string VisitMacroDefinition(MacroDefinition macro) |
throw new NotImplementedException(); |
||||||
{ |
} |
||||||
throw new NotImplementedException(); |
|
||||||
} |
public string VisitFunctionTemplateDecl(FunctionTemplate template) |
||||||
|
{ |
||||||
public string VisitNamespace(Namespace @namespace) |
throw new NotImplementedException(); |
||||||
{ |
} |
||||||
throw new NotImplementedException(); |
|
||||||
} |
public string VisitMacroDefinition(MacroDefinition macro) |
||||||
|
{ |
||||||
public string VisitEvent(Event @event) |
throw new NotImplementedException(); |
||||||
{ |
} |
||||||
throw new NotImplementedException(); |
|
||||||
} |
public string VisitNamespace(Namespace @namespace) |
||||||
|
{ |
||||||
public string VisitProperty(Property property) |
throw new NotImplementedException(); |
||||||
{ |
} |
||||||
throw new NotImplementedException(); |
|
||||||
} |
public string VisitEvent(Event @event) |
||||||
|
{ |
||||||
public string ToString(Type type) |
throw new NotImplementedException(); |
||||||
{ |
} |
||||||
return type.Visit(this); |
|
||||||
} |
public string VisitProperty(Property property) |
||||||
} |
{ |
||||||
} |
throw new NotImplementedException(); |
||||||
|
} |
||||||
|
|
||||||
|
public string ToString(Type type) |
||||||
|
{ |
||||||
|
return type.Visit(this); |
||||||
|
} |
||||||
|
} |
||||||
|
} |
||||||
|
Loading…
Reference in new issue