public WorkQueueView Copy()
        {
            Server.Application.WorkQueueView serverWorkQueueView = (Server.Application.WorkQueueView)ToServerObject();

            WorkQueueView copiedWorkQueueView = new WorkQueueView(application, serverWorkQueueView);

            return(copiedWorkQueueView);
        }
        public override Object ToServerObject()
        {
            Server.Application.WorkQueueView serverWorkQueueView = new Server.Application.WorkQueueView();

            MapToServerObject(serverWorkQueueView);

            return(serverWorkQueueView);
        }
        public virtual void MapToServerObject(Server.Application.WorkQueueView serverWorkQueueView)
        {
            base.MapToServerObject((Server.Application.CoreConfigurationObject)serverWorkQueueView);


            // COPY, DON'T REFERENCE

            serverWorkQueueView.FieldDefinitions = new Server.Application.WorkQueueViewFieldDefinition[fieldDefinitions.Count];

            Int32 currentDefinitionIndex = 0;

            foreach (Server.Application.WorkQueueViewFieldDefinition currentDefinition in fieldDefinitions)
            {
                serverWorkQueueView.FieldDefinitions[currentDefinitionIndex] = application.CopyWorkQueueViewFieldDefinition(currentDefinition);

                currentDefinitionIndex = currentDefinitionIndex + 1;
            }


            // COPY, DON'T REFERENCE

            serverWorkQueueView.FilterDefinitions = new Dictionary <int, Server.Application.WorkQueueViewFilterDefinition> ();

            foreach (Int32 currentSequence in filterDefinitions.Keys)
            {
                serverWorkQueueView.FilterDefinitions.Add(currentSequence, application.CopyWorkQueueViewFilterDefinition(filterDefinitions[currentSequence]));
            }


            // COPY, DON'T REFERENCE

            serverWorkQueueView.SortDefinitions = new Dictionary <int, Server.Application.WorkQueueViewSortDefinition> ();

            foreach (Int32 currentSequence in sortDefinitions.Keys)
            {
                serverWorkQueueView.SortDefinitions.Add(currentSequence, application.CopyWorkQueueViewSortDefinition(sortDefinitions[currentSequence]));
            }


            return;
        }
        protected void BaseConstructor(Application applicationReference, Server.Application.WorkQueueView serverWorkQueueView)
        {
            base.BaseConstructor(applicationReference, serverWorkQueueView);


            // COPY FIELD DEFINITIONS (NOT REFERENCE)

            fieldDefinitions = new List <Server.Application.WorkQueueViewFieldDefinition> ();

            foreach (Server.Application.WorkQueueViewFieldDefinition currentFieldDefinition in serverWorkQueueView.FieldDefinitions)
            {
                fieldDefinitions.Add(application.CopyWorkQueueViewFieldDefinition(currentFieldDefinition));
            }

            // COPY FILTER DEFINITIONS (NOT REFERENCE)

            filterDefinitions = new SortedList <Int32, Server.Application.WorkQueueViewFilterDefinition> ();

            foreach (Int32 currentSequence in serverWorkQueueView.FilterDefinitions.Keys)
            {
                filterDefinitions.Add(currentSequence, application.CopyWorkQueueViewFilterDefinition(serverWorkQueueView.FilterDefinitions[currentSequence]));
            }


            // COPY SORT DEFINITIONS (NOT REFERENCE)

            sortDefinitions = new SortedList <Int32, Server.Application.WorkQueueViewSortDefinition> ();

            foreach (Int32 currentSequence in serverWorkQueueView.SortDefinitions.Keys)
            {
                sortDefinitions.Add(currentSequence, application.CopyWorkQueueViewSortDefinition(serverWorkQueueView.SortDefinitions [currentSequence]));
            }


            return;
        }
        public WorkQueueView(Application applicationReference, Server.Application.WorkQueueView serverWorkQueueView)
        {
            BaseConstructor(applicationReference, serverWorkQueueView);

            return;
        }