MongoDB.Bson.Serialization.Conventions.AttributeConventionPack.AttributeConvention.AllowsDuplicate C# (CSharp) 메소드

AllowsDuplicate() 개인적인 메소드

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

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