/// <summary>
        /// Get Source
        /// attribute variablename : Type
        /// </summary>
        /// <returns></returns>
        internal override string GetSource(TsGeneratorOptions options, TsWriteInformation info)
        {
            //check if there are types defined
            if (!Types.Any())
            {
                throw new Exception(string.Format("No Types for Parameterdeclaration ({0}) defined", Name));
            }
            //combine types
            string typeSource = string.Join(TsDomConstants.MULTIPLETYPE_SEPERATOR, Types.Select(el => el.TsTypeName));

            //set type
            if (_isIndexParameter)
            {
                return(string.Format(TsDomConstants.TS_ELEMENT_TYPE_INDEX_FORMAT, _indexName, _indexType.TsTypeName,
                                     typeSource));
            }
            //if its not an index parameter
            else
            {
                string source = Name;
                //add attribute if its available
                if (Attributes != TsTypeAttributes.None)
                {
                    source = TsTypeAttributeMappings.TypeMappings[Attributes] + TsDomConstants.ATTRIBUTE_SEPEARATOR + source;
                }
                //add nullable
                if (IsNullable)
                {
                    source = string.Format(TsDomConstants.NULLABLE_FORMAT, source);
                }
                return(string.Format(TsDomConstants.TS_ELEMENT_TYPE_FORMAT, source, typeSource));
            }
        }
示例#2
0
        /// <summary>
        /// GetSoruce
        /// </summary>
        /// <param name="options"></param>
        /// <param name="info"></param>
        /// <returns></returns>
        internal override string GetSource(TsGeneratorOptions options, TsWriteInformation info)
        {
            //method source
            var    methodSource = Method.GetSource(options, info);
            string parameters   = string.Join(TsDomConstants.PARAMETER_SEPERATOR, Parameters.ToList().Select(el => el.GetSource(options, info)).ToList());

            return(string.Format(TsDomConstants.TS_MEMBERMETHOD_FORMAT, methodSource, parameters));
        }
        /// <summary>
        /// GetSource
        /// </summary>
        /// <param name="options"></param>
        /// <param name="info"></param>
        /// <returns></returns>
        internal override string GetSource(TsGeneratorOptions options, TsWriteInformation info)
        {
            //get operator source
            var operatorSource = TsBinaryOperatorMappings.BinaryOperatorMappings[Operator];
            var leftSource     = Left.GetSource(options, info);
            var rightSource    = Right.GetSource(options, info);

            return(string.Format(TsDomConstants.TS_BINARYOPERATOR_EXPRESSION_FORMAT, leftSource, operatorSource, rightSource));
        }
示例#4
0
 /// <summary>
 /// GetSource
 /// </summary>
 /// <param name="options"></param>
 /// <param name="info"></param>
 /// <returns></returns>
 internal override string GetSource(TsGeneratorOptions options, TsWriteInformation info)
 {
     if (TargetObject == null)
     {
         throw new ArgumentNullException("TargetObject in TsCodeFieldReferenceExpression is null");
     }
     //return source + indent string
     return(string.Format(TsDomConstants.ELEMENT_SUB_REFERENCE_FORMAT, TargetObject.GetSource(options, info), FieldName));
 }
示例#5
0
        /// <summary>
        /// GetSource
        /// </summary>
        /// <param name="options"></param>
        /// <param name="info"></param>
        /// <returns></returns>
        internal override string GetSource(TsGeneratorOptions options, TsWriteInformation info)
        {
            var source = Name;

            //if we need to get the object key
            if (ObjectKey != null)
            {
                source = string.Format(TsDomConstants.TS_OBJECT_KEY_FORMAT, Name, ObjectKey.GetSource(options, info));
            }
            return(source);
        }
示例#6
0
 /// <summary>
 /// GetString
 /// </summary>
 /// <param name="options"></param>
 /// <param name="info"></param>
 /// <returns></returns>
 internal string GetStringFromWriteSource(TsGeneratorOptions options, TsWriteInformation info)
 {
     using (var memoryStream = new MemoryStream())
     {
         using (var writer = new StreamWriter(memoryStream))
         {
             //writesource
             WriteSource(writer, options, info);
             writer.Flush();
             memoryStream.Seek(0, SeekOrigin.Begin);
             return(Encoding.UTF8.GetString(memoryStream.ToArray()));
         }
     }
 }
示例#7
0
        /// <summary>
        /// GetSource
        /// </summary>
        /// <returns></returns>
        internal override string GetSource(TsGeneratorOptions options, TsWriteInformation info)
        {
            var source = TsDomConstants.STATEMENT_BRACKET_BEGIN;

            //if there are properties
            if (Properties.Any())
            {
                var newInfo = info.Clone(info.Depth + 1);
                newInfo.ForType            = TsElementTypes.InlineObject;
                newInfo.MemberNameAsString = MemberNameAsString;
                //add new Line
                source += Environment.NewLine;
                Properties.ToList().ForEach(el => source += el.GetStringFromWriteSource(options, newInfo));
                source += options.GetPreLineIndentString(info.Depth);
            }
            source += TsDomConstants.STATEMENT_BRACKET_END;
            //return
            return(source);
        }
示例#8
0
        /// <summary>
        /// Get Source
        /// </summary>
        /// <param name="options"></param>
        /// <param name="info"></param>
        /// <returns></returns>
        internal string GetSource(TsGeneratorOptions options, TsWriteInformation info)
        {
            //add begin
            var result = TsDomConstants.COMMENT_BEGIN;

            if (!string.IsNullOrEmpty(Text))
            {
                //check if there are more lines
                var commentLines = Text.Split(new string[] { Environment.NewLine }, StringSplitOptions.RemoveEmptyEntries);
                //add first line
                result += commentLines.First();
                //iterate all other lines
                for (int i = 1; i < commentLines.Length; i++)
                {
                    result += Environment.NewLine + options.GetPreLineIndentString(info.Depth) + TsDomConstants.COMMENT_IN_LINE + commentLines[i];
                }
                result += TsDomConstants.COMMENT_END;
            }
            return(result);
        }
示例#9
0
 /// <summary>
 /// Creates the parametersource
 /// </summary>
 /// <returns></returns>
 private string GetParameterSource(TsGeneratorOptions options, TsWriteInformation info)
 {
     if (Parameters.Any())
     {
         //get first optional parameter
         var firstOptionalParameter = Parameters.FirstOrDefault(el => el.IsNullable);
         if (firstOptionalParameter != null)
         {
             var optionalIndex = Parameters.ToList().IndexOf(firstOptionalParameter);
             for (int i = optionalIndex + 1; i < Parameters.Count(); i++)
             {
                 if (!Parameters[i].IsNullable)
                 {
                     throw new Exception("TsCodeMemberMethod, required parameter cant follow an optional parameter");
                 }
             }
         }
         return(string.Join(TsDomConstants.PARAMETER_SEPERATOR, Parameters.Select(el => el.GetSource(options, info))));
     }
     else
     {
         return(string.Empty);
     }
 }
示例#10
0
        /// <summary>
        /// WriteSource
        /// </summary>
        /// <param name="writer"></param>
        /// <param name="options"></param>
        /// <param name="info"></param>
        internal override void WriteSource(StreamWriter writer, TsGeneratorOptions options, TsWriteInformation info)
        {
            //if add blank lines option is set, add a empty line
            if (options.BlankLinesBetweenMembers)
            {
                writer.WriteLine();
            }
#warning write custom attriubtes here not in inherited classes
            //write comments if exists
            if (Comments.Any())
            {
                Comments.ToList().ForEach(el => el.WriteSource(writer, options, info));
            }
        }
示例#11
0
 /// <summary>
 /// Write Content
 /// </summary>
 /// <param name="writer"></param>
 /// <param name="options"></param>
 /// <param name="depth"></param>
 private void WriteContent(System.IO.StreamWriter writer, TsGeneratorOptions options, TsWriteInformation info)
 {
     //add types source
     foreach (var item in Types)
     {
         //write type source
         item.WriteSource(writer, options, info);
     }
 }
示例#12
0
 /// <summary>
 /// Write Source
 /// </summary>
 /// <param name="writer"></param>
 internal override void WriteSource(System.IO.StreamWriter writer, TsGeneratorOptions options, TsWriteInformation info)
 {
     //if there are comments write them
     if (Comments.Any())
     {
         Comments.ToList().ForEach(el => el.WriteSource(writer, options, info));
     }
     //if there is a name
     if (HasName)
     {
         //add statement begin
         var namespaceSource = AddStatementBegin(string.Format(TsDomConstants.TS_NAMESPACE_FORMAT, Name), options, info.Depth);
         //write statement line
         writer.WriteLine(namespaceSource);
         //add imports
         Imports.ToList().ForEach(el => el.WriteSource(writer, options, info.Clone(info.Depth + 1)));
         //write content
         WriteContent(writer, options, info.Clone(info.Depth + 1));
         //write close statement
         writer.WriteLine(GetStatementEnd(options, info.Depth));
     }
     //if there is no name just add content
     else
     {
         //add imports
         Imports.ToList().ForEach(el => el.WriteSource(writer, options, info));
         WriteContent(writer, options, info.Clone());
     }
 }
示例#13
0
        /// <summary>
        /// Write Source
        /// </summary>
        /// <param name="writer"></param>
        internal override void WriteSource(System.IO.StreamWriter writer, TsGeneratorOptions options, TsWriteInformation info)
        {
            //write base stuff
            base.WriteSource(writer, options.Clone(options.IndentString, false), info);
            //get line Intend string
            var intendLineString = options.GetPreLineIndentString(info.Depth);
            //membername (nullable for inline objects not allowed)
            var memberName = IsNullable && info.ForType != TsElementTypes.InlineObject ? string.Format(TsDomConstants.NULLABLE_FORMAT, Name) : Name;
            //prepare source
            var source = string.Empty;

            //we dont need the type for constant
            if (info.ForType == TsElementTypes.Constant ||
                info.ForType == TsElementTypes.InlineObject ||
                info.ForType == TsElementTypes.Enumerations)
            {
                //if its an inline object and membername as string => add string signs
                if (info.ForType == TsElementTypes.InlineObject && info.MemberNameAsString)
                {
                    memberName = string.Format(TsDomConstants.STRING_VALUE_FORMAT, memberName);
                }
                source += memberName;
            }
            else
            {
                source += string.Format(TsDomConstants.TS_ELEMENT_TYPE_FORMAT, memberName, GetTypeSource());
            }
            //typeattributes are only interresting in classes
            if (info.ForType == TsElementTypes.Class)
            {
                //get type attributes
                var typeAttributes = TsTypeAttributeMappings.TypeMappings.Where(el => TypeAttributes.HasFlag(el.Key)).OrderBy(el => el.Key).ToList();
                //combine attriubtes
                var typeAttributeSource = string.Join(TsDomConstants.ATTRIBUTE_SEPEARATOR, typeAttributes.Select(el => el.Value));
                //add type attribute
                source = string.Format(TsDomConstants.TS_ATTRIBUTE_COMBINE_FORMAT, typeAttributeSource, source);
            }
            //add line intendent string
            source = intendLineString + source;
            //add init statement if its set
            if (InitStatement != null)
            {
                AddInitStatement(ref source, info.ForType, options, info);
            }
            //add end seperator (for enum its different
            var endSeperator = info.ForType == TsElementTypes.Enumerations || info.ForType == TsElementTypes.Constant || info.ForType == TsElementTypes.InlineObject ? TsDomConstants.LIST_ELEMENT_SEPERATOR : TsDomConstants.EXPRESSION_END;

            //add end seperator
            source += endSeperator;
            //write
            writer.WriteLine(source);
        }
示例#14
0
        /// <summary>
        /// Add Init statement
        /// </summary>
        /// <param name="source"></param>
        private void AddInitStatement(ref string source, TsElementTypes elementType, TsGeneratorOptions options, TsWriteInformation info)
        {
            switch (elementType)
            {
            //constant
            case TsElementTypes.Constant:
            {
                source = string.Format(TsDomConstants.TS_CONSTANT_SETVALUE_FORMAT, source, InitStatement.GetSource(options, info));
                break;
            }

            case TsElementTypes.Class:
            case TsElementTypes.Enumerations:
            {
                source = string.Format(TsDomConstants.ASSIGN_FORMAT, source, InitStatement.GetSource(options, info));
                break;
            }

            case TsElementTypes.InlineObject:
            {
                source = string.Format(TsDomConstants.TS_INLINEOBJECT_SETVALUE_FORMAT, source, InitStatement.GetSource(options, info));
                break;
            }

            default:
            {
                throw new NotImplementedException(string.Format("InitStatement for Type ({0}) is not implemented", elementType.ToString()));
            }
            }
        }
示例#15
0
        /// <summary>
        /// Write Source
        /// </summary>
        /// <param name="writer"></param>
        /// <param name="options"></param>
        /// <param name="info"></param>
        internal override void WriteSource(System.IO.StreamWriter writer, TsGeneratorOptions options, TsWriteInformation info)
        {
            if (Comment == null)
            {
                throw new ArgumentNullException("Comment in TsCodeCommentStatement is null");
            }
            //write comment
            var source = options.GetPreLineIndentString(info.Depth);

            source += Comment.GetSource(options, info);
            writer.WriteLine(source);
        }
示例#16
0
        /// <summary>
        /// Write Source
        /// </summary>
        /// <param name="writer"></param>
        internal override void WriteSource(System.IO.StreamWriter writer, TsGeneratorOptions options, TsWriteInformation info)
        {
            //write base stuff
            base.WriteSource(writer, options.Clone(options.IndentString, false), info);
            //sec check
            if (info.ForType != TsElementTypes.Class)
            {
                throw new Exception("TsCodeMemberProperty can only be defined for class");
            }
            if (!Types.Any())
            {
                throw new Exception("TsCodeMemberProperty type not defined");
            }
            //prepare source
            var source = options.GetPreLineIndentString(info.Depth);

            //add attributres
            if (Attributes != TsMemberAttributes.None)
            {
                source += TsMemberAttributeMappings.TypeMappings[Attributes] + TsDomConstants.ATTRIBUTE_SEPEARATOR;
            }
            //if there is no setter and getter this is a bit useless
            if (!HasSet && !HasGet)
            {
                throw new Exception("TsCodeMemberProperty there is no setter and getter for MemberProperty" + Name);
            }
            //if we have a getter write getter
            if (HasGet)
            {
                var getSource = source + string.Format(TsDomConstants.GETTER_FORMAT, Name, GetTypeSource()) + TsDomConstants.STATEMENT_BRACKET_BEGIN;
                //write begin line
                writer.WriteLine(getSource);
                //write statemetns
                GetStatements.ToList().ForEach(el => el.WriteSource(writer, options, info.Clone(info.Depth + 1)));
                //write end source
                writer.WriteLine(GetStatementEnd(options, info.Depth));
            }
            //as setter
            if (HasSet)
            {
                var setSource = source + string.Format(TsDomConstants.SETTER_FORMAT, Name, SetParameterName, GetTypeSource()) + TsDomConstants.STATEMENT_BRACKET_BEGIN;
                //write begin line
                writer.WriteLine(setSource);
                //write statemetns
                SetStatements.ToList().ForEach(el => el.WriteSource(writer, options, info.Clone(info.Depth + 1)));
                //write end source
                writer.WriteLine(GetStatementEnd(options, info.Depth));
            }
        }
示例#17
0
        /// <summary>
        /// WriteSource
        /// </summary>
        /// <param name="writer"></param>
        /// <param name="options"></param>
        /// <param name="info"></param>
        internal override void WriteSource(System.IO.StreamWriter writer, TsGeneratorOptions options, TsWriteInformation info)
        {
            //sec check
            if (Expression == null)
            {
                throw new Exception(string.Format("TsCodeExpressionStatement: Expression is null"));
            }
            var source = options.GetPreLineIndentString(info.Depth);

            source += Expression.GetSource(options, info) + TsDomConstants.EXPRESSION_END;
            //write
            writer.WriteLine(source);
        }
示例#18
0
        /// <summary>
        /// Write Soruce
        /// </summary>
        /// <param name="writer"></param>
        /// <param name="options"></param>
        /// <param name="info"></param>
        internal override void WriteSource(System.IO.StreamWriter writer, TsGeneratorOptions options, TsWriteInformation info)
        {
            //type variableName = initexpression
            //add line indent string
            var source = options.GetPreLineIndentString(info.Depth);

            //add type and variable name
            source += InitKeyReference.TsTypeName + TsDomConstants.ATTRIBUTE_SEPEARATOR + Name;
            //if type is set we will add type
            if (Type != null)
            {
                source = string.Format(TsDomConstants.TS_ELEMENT_TYPE_FORMAT, source, Type.TsTypeName);
            }
            //if there is an init expression add init expression
            if (InitExpression != null)
            {
                source = string.Format(TsDomConstants.ASSIGN_FORMAT, source, InitExpression.GetSource(options, info));
            }
            source += TsDomConstants.EXPRESSION_END;
            //write source
            writer.WriteLine(source);
        }
示例#19
0
        /// <summary>
        /// Write Source
        /// attribute methodname() : returntype
        /// </summary>
        /// <param name="writer"></param>
        /// <param name="options"></param>
        /// <param name="info"></param>
        internal override void WriteSource(System.IO.StreamWriter writer, TsGeneratorOptions options, TsWriteInformation info)
        {
            //write base stuff
            base.WriteSource(writer, options, info);
            //check
            if (Decorators.Any())
            {
                throw new NotImplementedException("CodeMemberMethod, CustomAttributes not implemented yet!");
            }
            //set attribute
            var methodTypeSource = GetSource();

            if (Attributes != TsMemberAttributes.None)
            {
                methodTypeSource = TsMemberAttributeMappings.TypeMappings[Attributes] + TsDomConstants.ATTRIBUTE_SEPEARATOR + methodTypeSource;
            }
            //add method source
            var methodSource = options.GetPreLineIndentString(info.Depth) + string.Format(TsDomConstants.TS_MEMBERMETHOD_FORMAT, methodTypeSource, GetParameterSource(options, info));

            //return type (empty string if not available)
            if (ReturnType != null)
            {
                methodSource = string.Format(TsDomConstants.TS_ELEMENT_TYPE_FORMAT, methodSource, ReturnType.TsTypeName);
            }
            // we only write method info for interfaces
            if (info.ForType != TsElementTypes.Interface)
            {
                //add statement begin
                methodSource += TsDomConstants.ATTRIBUTE_SEPEARATOR + TsDomConstants.STATEMENT_BRACKET_BEGIN;
                //write begin line
                writer.WriteLine(methodSource);
                //write statemetns
                Statements.ToList().ForEach(el => el.WriteSource(writer, options, info.Clone(info.Depth + 1)));
                //write end source
                writer.WriteLine(GetStatementEnd(options, info.Depth));
            }
            else
            {
                methodSource += TsDomConstants.EXPRESSION_END;
                writer.WriteLine(methodSource);
            }
        }
示例#20
0
        /// <summary>
        /// Write Source
        /// </summary>
        /// <param name="writer"></param>
        /// <param name="options"></param>
        /// <param name="depth"></param>
        internal override void WriteSource(StreamWriter writer, TsGeneratorOptions options, TsWriteInformation info)
        {
            //write base stuff
            base.WriteSource(writer, options, info);
            string detail;

            if (!IsValid(out detail))
            {
                throw new Exception(string.Format("Type({0}) {1}", Name, detail));
            }
            //add custom attributes
            AddCustomAttributes(writer, options, info.Depth);
            //get classname
            string classStatementSource = string.Format(GetTypeFormatString(), Name);

            //if its abstract add abstract keyword
            if ((Attributes & TsTypeAttributes.Abstract) != 0)
            {
                classStatementSource = string.Format(TsDomConstants.TS_ABSTRACT_FORMAT, classStatementSource);
            }
            //if attributes is public
            if ((Attributes & TsTypeAttributes.Public) != 0)
            {
                classStatementSource = string.Format(TsDomConstants.TS_EXPORT_FORMAT, classStatementSource);
            }
            //add baseTypes
            classStatementSource = AddBaseTypes(classStatementSource);
            //if its a constant (constants assign the code)
            if (ElementType == TsElementTypes.Constant)
            {
                classStatementSource = string.Format(TsDomConstants.ASSIGN_FORMAT, classStatementSource, string.Empty);
            }
            //add begin statement
            classStatementSource = AddStatementBegin(classStatementSource, options, info.Depth);
            //write
            writer.WriteLine(classStatementSource);
            //add content
            AddContent(writer, options, info.Depth + 1);
            //perpare endStatement
            var endStatement = GetStatementEnd(options, info.Depth);

            if (ElementType == TsElementTypes.Constant)
            {
                endStatement += TsDomConstants.EXPRESSION_END;
            }
            //write close statement
            writer.WriteLine(endStatement);
        }
示例#21
0
        /// <summary>
        /// write source
        /// </summary>
        /// <param name="writer"></param>
        /// <param name="options"></param>
        /// <param name="info"></param>
        internal override void WriteSource(System.IO.StreamWriter writer, TsGeneratorOptions options, TsWriteInformation info)
        {
            var source = options.GetPreLineIndentString(info.Depth);

            source += string.Format(TsDomConstants.ASSIGN_FORMAT, Left.GetSource(options, info), Right.GetSource(options, info));
            source += TsDomConstants.EXPRESSION_END;
            //write
            writer.WriteLine(source);
        }
示例#22
0
        /// <summary>
        /// Write Source
        /// </summary>
        /// <param name="writer"></param>
        /// <param name="options"></param>
        /// <param name="info"></param>
        internal override void WriteSource(System.IO.StreamWriter writer, TsGeneratorOptions options, TsWriteInformation info)
        {
            //sec check
            if (Condition == null)
            {
                throw new ArgumentNullException("Condition in TsConditionStatement not set");
            }
            //get condition source
            string conditionSource = Condition.GetSource(options, info);
            //create statement
            string statementSource = options.GetPreLineIndentString(info.Depth) + string.Format(TsDomConstants.TS_IF_STATEMENT_FORMAT, conditionSource);

            //add start bracket for true condition
            statementSource += TsDomConstants.STATEMENT_BRACKET_BEGIN;
            //write
            writer.WriteLine(statementSource);
            //if there are true statements (add them)
            if (TrueStatements.Any())
            {
                //write statements
                TrueStatements.ToList().ForEach(el => el.WriteSource(writer, options, info.Clone(info.Depth + 1)));
            }

            //write end bracket
            writer.WriteLine(GetStatementEnd(options, info.Depth));
        }
示例#23
0
        /// <summary>
        /// Write Source
        /// </summary>
        /// <param name="writer"></param>
        /// <param name="options"></param>
        /// <param name="info"></param>
        internal override void WriteSource(System.IO.StreamWriter writer, TsGeneratorOptions options, TsWriteInformation info)
        {
            //sec check
            string detailError = null;

            if (!IsValid(out detailError))
            {
                throw new Exception(detailError);
            }
            //get type string
            string typeString;

            //get typestring (if there isnt a type, use all selector)
            if (ImportTypes.Count <= 0)
            {
                typeString = TsDomConstants.START_SIGN;
            }
            else
            {
                var importTypeSourceList    = ImportTypes.OrderBy(el => el.Name).Select(el => el.GetSource());
                var importTypeIsNotSpecific = ImportTypes.Count == 1 && ImportTypes[0].IsImportAll;
                // if the import type is import all and its only one type, we dont need to wrap it in brackets
                typeString = importTypeIsNotSpecific
                    ? ImportTypes[0].GetSource()
                    : string.Format(TsDomConstants.CURLY_INLINE_BRACKETS_FORMAT, string.Join(TsDomConstants.PARAMETER_SEPERATOR, importTypeSourceList));
            }

            string source = null;

            // export
            if (IsExport)
            {
                source = string.Format(TsDomConstants.TS_EXPORT_STATEMENT_FORMAT, typeString, Path);
            }
            // import
            else
            {
                source = string.Format(TsDomConstants.TS_IMPORT_FORMAT, typeString, Path);
            }
            //add end expression
            source += TsDomConstants.EXPRESSION_END;
            //write import
            writer.WriteLine(options.GetPreLineIndentString(info.Depth) + source);
        }
        /// <summary>
        /// WriteSource
        /// </summary>
        /// <param name="writer"></param>
        /// <param name="options"></param>
        /// <param name="info"></param>
        internal override void WriteSource(System.IO.StreamWriter writer, TsGeneratorOptions options, TsWriteInformation info)
        {
            if (Expression == null)
            {
                throw new ArgumentNullException("Expression in TsCodeMethodReturnStatement is null");
            }
            var source = options.GetPreLineIndentString(info.Depth) + string.Format(TsDomConstants.TS_METHOD_RETURN_FORMAT, Expression.GetSource(options, info)) + TsDomConstants.EXPRESSION_END;

            //write source
            writer.WriteLine(source);
        }
示例#25
0
        /// <summary>
        /// GetSource
        /// </summary>
        /// <param name="options"></param>
        /// <param name="info"></param>
        /// <returns></returns>
        internal override string GetSource(TsGeneratorOptions options, TsWriteInformation info)
        {
            var source = string.Format(TsDomConstants.ELEMENT_SUB_REFERENCE_FORMAT, TargetObject.GetSource(options, info), MethodName);

            return(source);
        }
示例#26
0
 /// <summary>
 /// GetSource
 /// </summary>
 /// <param name="options"></param>
 /// <param name="info"></param>
 /// <returns></returns>
 internal override string GetSource(TsGeneratorOptions options, TsWriteInformation info)
 {
     return(TsDomConstants.SUPER_VALUE);
 }
示例#27
0
 /// <summary>
 /// GetSource
 /// </summary>
 internal override string GetSource(TsGeneratorOptions options, TsWriteInformation info)
 {
     return(_value);
 }
示例#28
0
 internal abstract void WriteSource(StreamWriter writer, TsGeneratorOptions options, TsWriteInformation info);