Example #1
0
        private HyvesEntityType TransformCreatorType()
        {
            Debug.Assert(this.creatorTypeTransformed == false);

            HyvesEntityType creatorType = HyvesEntityType.NotSpecified;
            string          state       = GetState <string>("creatortype") ?? String.Empty;

            if (state.Length != 0)
            {
                switch (state)
                {
                case "gadget":
                    creatorType = HyvesEntityType.Gadget;
                    break;

                case "user":
                    creatorType = HyvesEntityType.User;
                    break;
                }
            }

            this["creatortype"]         = creatorType;
            this.creatorTypeTransformed = true;

            return(creatorType);
        }
        private HyvesEntityType TransformBuzzType()
        {
            Debug.Assert(this.buzzTypeTransformed == false);

            HyvesEntityType targetType = HyvesEntityType.NotSpecified;
            string          state      = GetState <string>("buzztype") ?? String.Empty;

            if (state.Length != 0)
            {
                switch (state)
                {
                case "blog":
                    targetType = HyvesEntityType.Blog;
                    break;

                case "gadget":
                    targetType = HyvesEntityType.Gadget;
                    break;

                case "group":
                    targetType = HyvesEntityType.Group;
                    break;

                case "ping":
                    targetType = HyvesEntityType.Ping;
                    break;

                case "song":
                    targetType = HyvesEntityType.Song;
                    break;

                case "www":
                    targetType = HyvesEntityType.Www;
                    break;
                }
            }

            this["buzztype"]         = targetType;
            this.buzzTypeTransformed = true;

            return(targetType);
        }