Beispiel #1
0
        /// <summary>
        /// Creates a set of dependencies that references the decorator.
        /// </summary>
        /// <returns>A set of dependencies that references the decorator.</returns>
        public CodeDependencies CreateImportDependency()
        {
            // Source is optional; might be an ambient type (like "any").
            if (string.IsNullOrWhiteSpace(Import)) return CodeDependencies.Empty;

            // Construct dependencies referencing the mapped type.
            return CodeDependencies.FromImports(new[] { new Import(DecoratorName, Import) });
        }
Beispiel #2
0
        /// <summary>
        /// Creates a set of dependencies that references the mapped type.
        /// </summary>
        /// <returns>A set of dependencies that references the mapped type.</returns>
        public CodeDependencies CreateImportDependency()
        {
            // Source is optional; might be an ambient type (like "any").
            if (string.IsNullOrWhiteSpace(Source))
            {
                return(CodeDependencies.Empty);
            }

            // Construct dependencies referencing the mapped type.
            return(CodeDependencies.FromImports(new[] { new Import(Name, Source) }));
        }