Exemple #1
0
            protected override bool TryGetChild(string name, out SchemaMemberBase child)
            {
                child = null;

                if (_children != null && _children.TryGet(name, out var schema))
                {
                    child = schema;
                    return(true);
                }

                return(false);
            }
Exemple #2
0
        public IDataProvider GetProvider(string name)
        {
            if (string.IsNullOrEmpty(name))
            {
                throw new ArgumentNullException(nameof(name));
            }

            if (_providers.TryGet(name, out var provider))
            {
                return(provider);
            }

            lock (_providers)
            {
                if (_providers.TryGet(name, out provider))
                {
                    return(provider);
                }

                _providers.Add(provider = this.CreateProvider(name));
            }

            return(provider);
        }