MongoDB.Bson.Serialization.BsonCreatorMap.CreateInstance C# (CSharp) Метод

CreateInstance() приватный Метод

private CreateInstance ( object>.Dictionary values ) : object
values object>.Dictionary
Результат object
        internal object CreateInstance(Dictionary<string, object> values)
        {
            var arguments = new List<object>();

            // get the values for the arguments to be passed to the creator delegate
            foreach (var elementName in _elementNames)
            {
                object argument;
                if (values.TryGetValue(elementName, out argument))
                {
                    values.Remove(elementName);
                }
                else if (!_defaultValues.TryGetValue(elementName, out argument))
                {
                    // shouldn't happen unless there is a bug in ChooseBestCreator
                    throw new BsonInternalException();
                }
                arguments.Add(argument);
            }

            return _delegate.DynamicInvoke(arguments.ToArray());
        }