Catel.Runtime.Serialization.Xml.DataContractSerializerFactory.XmlSerializerTypeInfo.IsSpecificTypeSpecialCollection C# (CSharp) Method

IsSpecificTypeSpecialCollection() private method

private IsSpecificTypeSpecialCollection ( Type type ) : bool
type System.Type
return bool
            private bool IsSpecificTypeSpecialCollection(Type type)
            {
                if (type.IsGenericTypeEx())
                {
                    var fullName = type.GetSafeFullName(false);

                    if (fullName.StartsWith("System.Collections.ObjectModel.ObservableCollection") ||
                        fullName.StartsWith("System.Collections.Generic."))
                    {
                        // Note: this is not a bug, we need to add type to the collection
                        return true;
                    }
                }

                return false;
            }
            #endregion