/// <summary> /// Gets the code for interface attribute. /// </summary> /// <returns> /// The code for the interface attribute. /// </returns> public string CreateCodeForInterfaceAttribute() { var eb = new ElementBuilder(); var attributeSection = eb.AddAttributeSection(null); var attribute = eb.AddAttribute(attributeSection, ContractClassAttributeName); var contractClassTypeReference = new TypeReferenceExpression(this.CreateContractClassName()); eb.AddArgument(attribute, new TypeOfExpression(contractClassTypeReference)); return(eb.GenerateCode(this.TextDocument.Language)); }
/// <summary> /// Gets the code for interface attribute. /// </summary> /// <returns> /// The code for the interface attribute. /// </returns> public string CreateCodeForInterfaceAttribute() { var eb = new ElementBuilder(); var attributeSection = eb.AddAttributeSection(null); var attribute = eb.AddAttribute(attributeSection, ContractClassAttributeName); var contractClassTypeReference = new TypeReferenceExpression(this.CreateContractClassName()); eb.AddArgument(attribute, new TypeOfExpression(contractClassTypeReference)); return eb.GenerateCode(this.TextDocument.Language); }