Beispiel #1
0
        public void Add(Basics.MetaRecord.TagSpaces tagSpace, string name, string value)
        {
            if (string.IsNullOrEmpty(name))
            {
                throw new NullReferenceException("Name can not be null!");
            }

            if (string.IsNullOrEmpty(value))
            {
                value = string.Empty;
            }

            switch (tagSpace)
            {
            case Basics.MetaRecord.TagSpaces.name:
                name = string.Format("name::{0}", name);

                break;

            case Basics.MetaRecord.TagSpaces.httpequiv:
                name = string.Format("httpequiv::{0}", name);

                break;

            case Basics.MetaRecord.TagSpaces.property:
                name = string.Format("property::{0}", name);

                break;
            }

            this._CustomRecords.AddOrUpdate(name, value, (cName, cValue) => value);
        }
Beispiel #2
0
        public void Add(Basics.MetaRecord.TagSpaces tagSpace, string name, string value)
        {
            if (string.IsNullOrEmpty(name))
            {
                throw new NullReferenceException("Name can not be null!");
            }

            if (string.IsNullOrEmpty(value))
            {
                value = string.Empty;
            }

            name = tagSpace switch
            {
                Basics.MetaRecord.TagSpaces.name => $"name::{name}",
                Basics.MetaRecord.TagSpaces.httpequiv => $"httpequiv::{name}",
                Basics.MetaRecord.TagSpaces.property => $"property::{name}",
                _ => name
            };

            this._CustomRecords.AddOrUpdate(name, value, (cName, cValue) => value);
        }