public FunctionTypeGenericNameTranslation(GenericNameTranslation genericNameTranslation) :base(genericNameTranslation) { ReturnType = genericNameTranslation.TypeArgumentList.Arguments.GetEnumerable().Last(); Arguments = new SeparatedSyntaxListTranslation<TypeSyntax, TypeTranslation>(); Arguments.Add(genericNameTranslation.TypeArgumentList.Arguments.GetEnumerable().Where(f => f != ReturnType)); this.Attach(); }
public FunctionTypeGenericNameTranslation(GenericNameTranslation genericNameTranslation) : base(genericNameTranslation) { ReturnType = genericNameTranslation.TypeArgumentList.Arguments.GetEnumerable().Last(); Arguments = new SeparatedSyntaxListTranslation <TypeSyntax, TypeTranslation>(); Arguments.Add(genericNameTranslation.TypeArgumentList.Arguments.GetEnumerable().Where(f => f != ReturnType)); this.Attach(); }
public VariableDeclarationTranslation(VariableDeclarationSyntax syntax, SyntaxTranslation parent) : base(syntax, parent) { Type = syntax.Type.Get<TypeTranslation>(this); Variables = syntax.Variables.Get<VariableDeclaratorSyntax, VariableDeclaratorTranslation>(this); if (!syntax.Type.IsVar) { Variables.GetEnumerable().First().FirstType = Type; } foreach (var item in Variables.GetEnumerable()) { item.KnownType = Type; } }
public ParameterListTranslation(ParameterListSyntax syntax, SyntaxTranslation parent) : base(syntax, parent) { Parameters = syntax.Parameters.Get<ParameterSyntax, ParameterTranslation>(this); }
public ArgumentListTranslation(ArgumentListSyntax syntax, SyntaxTranslation parent) : base(syntax, parent) { Arguments = syntax.Arguments.Get<ArgumentSyntax, ArgumentTranslation>(this); }