Esempio n. 1
0
        public static void NormalizeAccess(this TagsCollection tags, TagsCollection profileTags, bool defaultAccess, params string[] accessTags)
        {
            bool?nullable1 = tags.InterpretAccessValue("access");

            for (int index = 0; index < accessTags.Length; ++index)
            {
                bool?nullable2 = tags.InterpretAccessValue(accessTags[index]);
                if (nullable2.HasValue)
                {
                    nullable1 = nullable2;
                }
            }
            if (!nullable1.HasValue || nullable1.Value == defaultAccess)
            {
                return;
            }
            if (nullable1.Value)
            {
                profileTags.Add(accessTags[accessTags.Length - 1], "yes");
            }
            else
            {
                profileTags.Add(accessTags[accessTags.Length - 1], "no");
            }
        }