public void GenericTypeWithFullNamespace() { ParseUtilCSharp.AssertDocumentationReference( "System.Collections.Generic.List{T}", new DocumentationReference { DeclaringType = new SimpleType("System").MemberType("Collections").MemberType("Generic"), MemberName = "List", TypeArguments = { new SimpleType("T") } }); }
public void OperatorPlusWithDeclaringType() { ParseUtilCSharp.AssertDocumentationReference( "Test.operator +", new DocumentationReference { DeclaringType = new SimpleType("Test"), EntityType = EntityType.Operator, OperatorType = OperatorType.Addition }); }
public void ImplicitOperator() { ParseUtilCSharp.AssertDocumentationReference( "implicit operator int", new DocumentationReference { EntityType = EntityType.Operator, OperatorType = OperatorType.Implicit, ConversionOperatorReturnType = new PrimitiveType("int") }); }
public void NestedTypeInGenericType() { ParseUtilCSharp.AssertDocumentationReference( "List{T}.Enumerator", new DocumentationReference { DeclaringType = new SimpleType("List", new SimpleType("T")), MemberName = "Enumerator" }); }
public void GenericMethodInGeneric() { ParseUtilCSharp.AssertDocumentationReference( "IGeneric{X, Y}.Test{Z}", new DocumentationReference { DeclaringType = new SimpleType("IGeneric", new SimpleType("X"), new SimpleType("Y")), MemberName = "Test", TypeArguments = { new SimpleType("Z") } }); }
public void ThisWithDeclaringType() { ParseUtilCSharp.AssertDocumentationReference( "List{T}.this", new DocumentationReference { EntityType = EntityType.Indexer, DeclaringType = new SimpleType("List", new SimpleType("T")) }); }
public void OperatorPlus() { ParseUtilCSharp.AssertDocumentationReference( "operator +", new DocumentationReference { EntityType = EntityType.Operator, OperatorType = OperatorType.Addition }); }
public void EmptyParameterList() { ParseUtilCSharp.AssertDocumentationReference( "Window1()", new DocumentationReference { MemberName = "Window1", HasParameterList = true }); }
public void MixedGeneric() { ParseUtilCSharp.AssertDocumentationReference( "IGeneric<X, Y}", new DocumentationReference { MemberName = "IGeneric", TypeArguments = { new SimpleType("X"), new SimpleType("Y") } }); }
public void PrimitiveType() { ParseUtilCSharp.AssertDocumentationReference( "int", new DocumentationReference { EntityType = EntityType.TypeDefinition, DeclaringType = new PrimitiveType("int") }); }
public void ThisWithParameter() { ParseUtilCSharp.AssertDocumentationReference( "this[int]", new DocumentationReference { SymbolKind = SymbolKind.Indexer, HasParameterList = true, Parameters = { new ParameterDeclaration { Type = new PrimitiveType("int") } } }); }
public void IntParse() { ParseUtilCSharp.AssertDocumentationReference( "int.Parse(string)", new DocumentationReference { DeclaringType = new PrimitiveType("int"), MemberName = "Parse", HasParameterList = true, Parameters = { new ParameterDeclaration { Type = new PrimitiveType("string") } } }); }
public void ExplicitOperatorWithParameterList() { ParseUtilCSharp.AssertDocumentationReference( "explicit operator int(Test)", new DocumentationReference { SymbolKind = SymbolKind.Operator, OperatorType = OperatorType.Explicit, ConversionOperatorReturnType = new PrimitiveType("int"), HasParameterList = true, Parameters = { new ParameterDeclaration { Type = new SimpleType("Test") }, } }); }
public void GenericMethodInGenericWithParameterList() { ParseUtilCSharp.AssertDocumentationReference( "IGeneric{X, Y}.Test{Z}(ref Z[,])", new DocumentationReference { DeclaringType = new SimpleType("IGeneric", new SimpleType("X"), new SimpleType("Y")), MemberName = "Test", TypeArguments = { new SimpleType("Z") }, HasParameterList = true, Parameters = { new ParameterDeclaration { ParameterModifier = ParameterModifier.Ref, Type = new SimpleType("Z").MakeArrayType(2) } } }); }
public void OperatorPlusWithParameterList() { ParseUtilCSharp.AssertDocumentationReference( "operator +(Test, int)", new DocumentationReference { SymbolKind = SymbolKind.Operator, OperatorType = OperatorType.Addition, HasParameterList = true, Parameters = { new ParameterDeclaration { Type = new SimpleType("Test") }, new ParameterDeclaration { Type = new PrimitiveType("int") } } }); }