public IEnumerable <String> Alias(AliasDef a) { var Name = GetEscapedIdentifier(a.DefinitionName()) + GetGenericParameters(a.GenericParameters); var Type = GetTypeString(a.Type, a.NamespaceName()); foreach (var _Line in Combine(Begin(), GetXmlComment(a.Description))) { yield return(_Line); } foreach (var _Line in Combine(Combine(Combine(Begin(), Name), " = "), Type)) { yield return(_Line); } }
public IEnumerable <String> Alias(AliasDef a) { var Name = GetEscapedIdentifier(a.DefinitionName()) + GetGenericParameters(a.GenericParameters); var Type = GetTypeString(a.Type, a.NamespaceName()); foreach (var _Line in Combine(Begin(), GetXmlComment(a.Description))) { yield return(_Line); } yield return("[Alias]"); foreach (var _Line in Combine(Combine(Begin(), "public sealed class "), Name)) { yield return(_Line); } yield return("{"); foreach (var _Line in Combine(Combine(Combine(Begin(), " public "), Type), " Value;")) { yield return(_Line); } yield return(""); foreach (var _Line in Combine(Combine(Combine(Combine(Combine(Begin(), " public static implicit operator "), Name), "("), Type), " o)")) { yield return(_Line); } yield return(" {"); foreach (var _Line in Combine(Combine(Combine(Begin(), " return new "), Name), " {Value = o};")) { yield return(_Line); } yield return(" }"); foreach (var _Line in Combine(Combine(Combine(Combine(Combine(Begin(), " public static implicit operator "), Type), "("), Name), " c)")) { yield return(_Line); } yield return(" {"); yield return(" return c.Value;"); yield return(" }"); yield return("}"); }
public IEnumerable <String> Alias(AliasDef a) { var Name = GetEscapedIdentifier(a.DefinitionName()) + GetGenericParameters(a.GenericParameters); var Type = GetTypeString(a.Type, a.NamespaceName()); foreach (var _Line in Combine(Begin(), GetXmlComment(a.Description))) { yield return(_Line); } yield return("@Alias"); foreach (var _Line in Combine(Combine(Begin(), "public final class "), Name)) { yield return(_Line); } yield return("{"); foreach (var _Line in Combine(Combine(Combine(Begin(), " public "), Type), " Value;")) { yield return(_Line); } yield return(""); foreach (var _Line in Combine(Combine(Combine(Combine(Combine(Begin(), " public static "), Name), " Create("), Type), " o)")) { yield return(_Line); } yield return(" {"); foreach (var _Line in Combine(Combine(Combine(Combine(Combine(Begin(), " "), Name), " r = new "), Name), "();")) { yield return(_Line); } yield return(" r.Value = o;"); yield return(" return r;"); yield return(" }"); yield return("}"); }
public IEnumerable <String> Alias(AliasDef a) { var Name = GetEscapedIdentifier(a.DefinitionName()) + GetGenericParameters(a.GenericParameters); var Type = GetTypeString(a.Type, a.NamespaceName()); foreach (var _Line in Combine(Begin(), GetXmlComment(a.Description))) { yield return(_Line); } yield return("<[Alias]()>"); foreach (var _Line in Combine(Combine(Begin(), "Public NotInheritable Class "), Name)) { yield return(_Line); } foreach (var _Line in Combine(Combine(Begin(), " Public Value As "), Type)) { yield return(_Line); } yield return(""); foreach (var _Line in Combine(Combine(Combine(Combine(Begin(), " Public Shared Widening Operator CType(ByVal o As "), Type), ") As "), Name)) { yield return(_Line); } foreach (var _Line in Combine(Combine(Combine(Begin(), " Return New "), Name), " With {.Value = o}")) { yield return(_Line); } yield return(" End Operator"); foreach (var _Line in Combine(Combine(Combine(Combine(Begin(), " Public Shared Widening Operator CType(ByVal c As "), Name), ") As "), Type)) { yield return(_Line); } yield return(" Return c.Value"); yield return(" End Operator"); yield return("End Class"); }
public IEnumerable <String> Alias(AliasDef a) { var Name = GetEscapedIdentifier(a.DefinitionName()) + GetGenericParameters(a.GenericParameters); var Type = GetTypeString(a.Type, a.NamespaceName()); foreach (var _Line in Combine(Begin(), GetXmlComment(a.Description))) { yield return(_Line); } yield return("/* Alias */"); foreach (var _Line in Combine(Begin(), GetGenericParameterLine(a.GenericParameters))) { yield return(_Line); } foreach (var _Line in Combine(Combine(Combine(Begin(), "class "), Name), " final")) { yield return(_Line); } yield return("{"); yield return("public:"); foreach (var _Line in Combine(Combine(Combine(Begin(), " "), Type), " Value;")) { yield return(_Line); } yield return(""); foreach (var _Line in Combine(Combine(Combine(Begin(), " "), Name), "()")) { yield return(_Line); } yield return(" {"); yield return(" }"); foreach (var _Line in Combine(Combine(Combine(Combine(Combine(Begin(), " "), Name), "(const "), Type), " &v)")) { yield return(_Line); } yield return(" : Value(v)"); yield return(" {"); yield return(" }"); yield return(""); foreach (var _Line in Combine(Combine(Combine(Begin(), " operator const "), Type), " &() const")) { yield return(_Line); } yield return(" {"); yield return(" return Value;"); yield return(" }"); yield return("};"); }