public ArgumentInfo(string type, string name)
        {
            CodeGenerationUtility.CheckNullOrWhitespaceArgument(type, nameof(type));
            CodeGenerationUtility.CheckValidIdentifierArgument(name, nameof(name));

            Type = type.Trim();
            Name = name;
        }
        public NamespaceCodeGenerator(ILanguageAbstraction languageAbstraction, string namespaceName)
        {
            if (languageAbstraction == null)
            {
                throw new ArgumentNullException(nameof(languageAbstraction));
            }
            CodeGenerationUtility.CheckNullOrWhitespaceArgument(namespaceName, nameof(namespaceName));

            Language = languageAbstraction;

            this.namespaceName = namespaceName;
        }
Ejemplo n.º 3
0
        public RawStatementCodeGenerator(ILanguageAbstraction languageAbstraction, string rawStatement)
        {
            if (languageAbstraction == null)
            {
                throw new ArgumentNullException(nameof(languageAbstraction));
            }
            CodeGenerationUtility.CheckNullOrWhitespaceArgument(rawStatement, nameof(rawStatement));

            Language = languageAbstraction;

            this.rawStatement = rawStatement;
        }
Ejemplo n.º 4
0
        private void Initialization(ILanguageAbstraction languageAbstraction, AccessModifier accessModifier, string[] additionalModifiers, string type, string name)
        {
            if (languageAbstraction == null)
            {
                throw new ArgumentNullException(nameof(languageAbstraction));
            }

            CodeGenerationUtility.CheckNullOrWhitespaceArgument(type, nameof(type));
            CodeGenerationUtility.CheckValidIdentifierArgument(name, nameof(name));

            Language = languageAbstraction;

            this.accessModifier      = accessModifier;
            this.additionalModifiers = additionalModifiers;
            this.type = type.Trim();
            this.name = name;
        }