Exemplo n.º 1
0
        /// <summary>
        /// Returns a list of all namespaces referenced/used in this property.
        /// </summary>
        internal IEnumerable <string> GetNamespaces()
        {
            foreach (string ns in Type.GetNamespaces())
            {
                yield return(ns);
            }

            foreach (string?ns in Attributes.Select(x => x.Identifier.Namespace))
            {
                if (ns != null)
                {
                    yield return(ns);
                }
            }

            if (Initializer != null)
            {
                foreach (string ns in Initializer.GetNamespaces())
                {
                    yield return(ns);
                }
            }

            if (GetterExpression != null)
            {
                foreach (string ns in GetterExpression.GetNamespaces())
                {
                    yield return(ns);
                }
            }
        }
Exemplo n.º 2
0
        public IEnumerable <string> GetNamespaces()
        {
            foreach (string ns in Type.GetNamespaces())
            {
                yield return(ns);
            }

            if (GetterExpression != null)
            {
                foreach (string ns in GetterExpression.GetNamespaces())
                {
                    yield return(ns);
                }
            }
        }