MongoDB.Bson.Serialization.Conventions.AttributeConventionPack.AttributeConvention.AllowsDuplicate C# (CSharp) Method

AllowsDuplicate() private method

private AllowsDuplicate ( Type type ) : bool
type System.Type
return bool
            private bool AllowsDuplicate(Type type)
            {
                var usageAttribute = type.GetCustomAttributes(typeof(BsonMemberMapAttributeUsageAttribute), true)
                    .OfType<BsonMemberMapAttributeUsageAttribute>()
                    .SingleOrDefault();

                return usageAttribute == null || usageAttribute.AllowMultipleMembers;
            }