Alpinely.TownCrier.SerializableEntities.SerializeableCollection.GetSerializeableCollection C# (CSharp) Method

GetSerializeableCollection() static private method

static private GetSerializeableCollection ( NameValueCollection col ) : SerializeableCollection
col System.Collections.Specialized.NameValueCollection
return SerializeableCollection
        internal static SerializeableCollection GetSerializeableCollection(NameValueCollection col)
        {
            if (col == null)
                return null;

            var scol = new SerializeableCollection();
            foreach (String key in col.Keys)
                scol.Collection.Add(key, col[key]);

            return scol;
        }

Same methods

SerializeableCollection::GetSerializeableCollection ( StringDictionary col ) : SerializeableCollection

Usage Example

        internal static SerializeableContentType GetSerializeableContentType(ContentType ct)
        {
            if (ct == null)
            {
                return(null);
            }

            var sct = new SerializeableContentType();

            sct._boundary   = ct.Boundary;
            sct._charSet    = ct.CharSet;
            sct._mediaType  = ct.MediaType;
            sct._name       = ct.Name;
            sct._parameters = SerializeableCollection.GetSerializeableCollection(ct.Parameters);

            return(sct);
        }
All Usage Examples Of Alpinely.TownCrier.SerializableEntities.SerializeableCollection::GetSerializeableCollection