当前位置: 首页>>代码示例>>C#>>正文


C# RequestCache类代码示例

本文整理汇总了C#中RequestCache的典型用法代码示例。如果您正苦于以下问题:C# RequestCache类的具体用法?C# RequestCache怎么用?C# RequestCache使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


RequestCache类属于命名空间,在下文中一共展示了RequestCache类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: Advanced_Search_YearRange_AggregationViewer

        /// <summary> Constructor for a new instance of the Advanced_Search_YearRange_AggregationViewer class </summary>
        /// <param name="RequestSpecificValues"> All the necessary, non-global data specific to the current request </param>
        /// <param name="ViewBag"> Aggregation-specific request information, such as aggregation object and any browse object requested </param>
        public Advanced_Search_YearRange_AggregationViewer(RequestCache RequestSpecificValues, AggregationViewBag ViewBag)
            : base(RequestSpecificValues, ViewBag)
        {
            // Compute the redirect stem to use
            string fields = RequestSpecificValues.Current_Mode.Search_Fields;
            string searchCollections = RequestSpecificValues.Current_Mode.SubAggregation;
            Display_Mode_Enum lastMode = RequestSpecificValues.Current_Mode.Mode;
            Aggregation_Type_Enum aggrType = RequestSpecificValues.Current_Mode.Aggregation_Type;
            RequestSpecificValues.Current_Mode.SubAggregation = String.Empty;

            string searchString = RequestSpecificValues.Current_Mode.Search_String;
            RequestSpecificValues.Current_Mode.Search_String = String.Empty;
            RequestSpecificValues.Current_Mode.Search_Fields = String.Empty;
            RequestSpecificValues.Current_Mode.Mode = Display_Mode_Enum.Results;
            RequestSpecificValues.Current_Mode.Search_Precision = Search_Precision_Type_Enum.Inflectional_Form;
            string redirectStem = UrlWriterHelper.Redirect_URL(RequestSpecificValues.Current_Mode);

            // Get the browse all url, if enabled
            string browse_url = String.Empty;
            if (ViewBag.Hierarchy_Object.Can_Browse_Items)
            {
                RequestSpecificValues.Current_Mode.Mode = Display_Mode_Enum.Aggregation;
                RequestSpecificValues.Current_Mode.Aggregation_Type = Aggregation_Type_Enum.Browse_Info;
                RequestSpecificValues.Current_Mode.Info_Browse_Mode = "all";
                browse_url = UrlWriterHelper.Redirect_URL(RequestSpecificValues.Current_Mode);
            }

            RequestSpecificValues.Current_Mode.Search_String = searchString;
            RequestSpecificValues.Current_Mode.Search_Fields = fields;
            RequestSpecificValues.Current_Mode.SubAggregation = searchCollections;
            RequestSpecificValues.Current_Mode.Mode = lastMode;
            RequestSpecificValues.Current_Mode.Aggregation_Type = aggrType;

            Search_Script_Action = "advanced_search_years_sobekcm('" + redirectStem + "','" + browse_url + "')";
        }
开发者ID:MarkVSullivan,项目名称:SobekCM-Web-Application,代码行数:38,代码来源:Advanced_Search_YearRange_AggregationViewer.cs

示例2: MySobek_HtmlSubwriter

        /// <summary> Constructor for a new instance of the MySobek_HtmlSubwriter class </summary>
        /// <param name="RequestSpecificValues"> All the necessary, non-global data specific to the current request </param>
        public MySobek_HtmlSubwriter(RequestCache RequestSpecificValues)
            : base(RequestSpecificValues)
        {
            RequestSpecificValues.Tracer.Add_Trace("MySobek_HtmlSubwriter.Constructor", "Saving values and geting user object back from the session");

            if (RequestSpecificValues.Current_Mode.My_Sobek_Type == My_Sobek_Type_Enum.Log_Out)
            {
                RequestSpecificValues.Tracer.Add_Trace("MySobek_HtmlSubwriter.Constructor", "Performing logout");

                HttpContext.Current.Session["user"] = null;
                HttpContext.Current.Response.Redirect("?", false);
                HttpContext.Current.ApplicationInstance.CompleteRequest();
                RequestSpecificValues.Current_Mode.Request_Completed = true;
                return;
            }

            if ((RequestSpecificValues.Current_Mode.My_Sobek_Type != My_Sobek_Type_Enum.Logon) && (RequestSpecificValues.Current_User != null) && (RequestSpecificValues.Current_User.Is_Temporary_Password))
            {
                RequestSpecificValues.Current_Mode.My_Sobek_Type = My_Sobek_Type_Enum.New_Password;
            }

            if (RequestSpecificValues.Current_Mode.Logon_Required)
                RequestSpecificValues.Current_Mode.My_Sobek_Type = My_Sobek_Type_Enum.Logon;

            RequestSpecificValues.Tracer.Add_Trace("MySobek_HtmlSubwriter.Constructor", "Building the my sobek viewer object");

            // Get the appropriate mysobek viewer from the factory
            mySobekViewer = MySobekViewer_Factory.Get_MySobekViewer(RequestSpecificValues);
        }
开发者ID:MarkVSullivan,项目名称:SobekCM-Web-Application,代码行数:31,代码来源:MySobek_HtmlSubwriter.cs

示例3: dLOC_Search_AggregationViewer

        /// <summary> Constructor for a new instance of the dLOC_Search_AggregationViewer class </summary>
        /// <param name="RequestSpecificValues"> All the necessary, non-global data specific to the current request </param>
        public dLOC_Search_AggregationViewer(RequestCache RequestSpecificValues)
            : base(RequestSpecificValues)
        {
            textBoxValue = String.Empty;
            if (RequestSpecificValues.Current_Mode.Search_String.Length > 0)
            {
                textBoxValue = RequestSpecificValues.Current_Mode.Search_String.Replace(",newspaper", "");
            }

            // Determine the complete script action name
            Display_Mode_Enum displayMode = RequestSpecificValues.Current_Mode.Mode;
            Aggregation_Type_Enum aggrType = RequestSpecificValues.Current_Mode.Aggregation_Type;
            Search_Type_Enum searchType = RequestSpecificValues.Current_Mode.Search_Type;
            RequestSpecificValues.Current_Mode.Mode = Display_Mode_Enum.Results;
            RequestSpecificValues.Current_Mode.Search_Type = Search_Type_Enum.Full_Text;
            string search_string = RequestSpecificValues.Current_Mode.Search_String;
            RequestSpecificValues.Current_Mode.Search_String = String.Empty;
            RequestSpecificValues.Current_Mode.Search_Fields = String.Empty;
            arg2 = String.Empty;
            RequestSpecificValues.Current_Mode.Search_Precision = Search_Precision_Type_Enum.Inflectional_Form;
            arg1 = UrlWriterHelper.Redirect_URL(RequestSpecificValues.Current_Mode);
            RequestSpecificValues.Current_Mode.Mode = Display_Mode_Enum.Aggregation;
            RequestSpecificValues.Current_Mode.Aggregation_Type = Aggregation_Type_Enum.Browse_Info;
            RequestSpecificValues.Current_Mode.Info_Browse_Mode = "all";
            browse_url = UrlWriterHelper.Redirect_URL(RequestSpecificValues.Current_Mode);

            Search_Script_Action = "dloc_search_sobekcm('" + arg1 + "', '" + browse_url + "');";

            RequestSpecificValues.Current_Mode.Mode = displayMode;
            RequestSpecificValues.Current_Mode.Aggregation_Type = aggrType;
            RequestSpecificValues.Current_Mode.Search_Type = searchType;
            RequestSpecificValues.Current_Mode.Search_String = search_string;
            RequestSpecificValues.Current_Mode.Info_Browse_Mode = String.Empty;
        }
开发者ID:Elkolt,项目名称:SobekCM-Web-Application,代码行数:36,代码来源:dLOC_Search_AggregationViewer.cs

示例4: Admin_HtmlSubwriter

        /// <summary> Constructor for a new instance of the Admin_HtmlSubwriter class </summary>
        /// <param name="RequestSpecificValues"> All the necessary, non-global data specific to the current request </param>
        public Admin_HtmlSubwriter( RequestCache RequestSpecificValues )
            : base(RequestSpecificValues)
        {
            RequestSpecificValues.Tracer.Add_Trace("Admin_HtmlSubwriter.Constructor", "Saving values and geting RequestSpecificValues.Current_User object back from the session");

            // All Admin pages require a RequestSpecificValues.Current_User being logged on
            if (RequestSpecificValues.Current_User == null)
            {
                RequestSpecificValues.Current_Mode.Mode = Display_Mode_Enum.My_Sobek;
                RequestSpecificValues.Current_Mode.My_Sobek_Type = My_Sobek_Type_Enum.Logon;
                RequestSpecificValues.Current_Mode.My_Sobek_SubMode = String.Empty;
                UrlWriterHelper.Redirect(RequestSpecificValues.Current_Mode);
                return;
            }

            // If the user is not an admin, and admin was selected, reroute this
            if ((!RequestSpecificValues.Current_User.Is_System_Admin) && (!RequestSpecificValues.Current_User.Is_Portal_Admin) && (RequestSpecificValues.Current_Mode.Admin_Type != Admin_Type_Enum.Aggregation_Single))
            {
                RequestSpecificValues.Current_Mode.Mode = Display_Mode_Enum.My_Sobek;
                RequestSpecificValues.Current_Mode.My_Sobek_Type = My_Sobek_Type_Enum.Home;
                RequestSpecificValues.Current_Mode.My_Sobek_SubMode = String.Empty;
                UrlWriterHelper.Redirect(RequestSpecificValues.Current_Mode);
                return;
            }

            // Get the appropriate admin viewer from the factory
            adminViewer = AdminViewer_Factory.Get_AdminViewer(RequestSpecificValues);
        }
开发者ID:MarkVSullivan,项目名称:SobekCM-Web-Application,代码行数:30,代码来源:Admin_HtmlSubwriter.cs

示例5: Saved_Searches_MySobekViewer

        /// <summary> Constructor for a new instance of the Saved_Searches_MySobekViewer class </summary>
        /// <param name="RequestSpecificValues"> All the necessary, non-global data specific to the current request </param>
        public Saved_Searches_MySobekViewer(RequestCache RequestSpecificValues)
            : base(RequestSpecificValues)
        {
            RequestSpecificValues.Tracer.Add_Trace("Saved_Searches_MySobekViewer.Constructor", String.Empty);

            if (RequestSpecificValues.Current_Mode.isPostBack)
            {
                // Pull the standard values
                NameValueCollection form = HttpContext.Current.Request.Form;

                string item_action = form["item_action"].ToUpper().Trim();
                string folder_id = form["folder_id"].Trim();

                if (item_action == "REMOVE")
                {
                    int folder_id_int;
                    if (Int32.TryParse(folder_id, out folder_id_int))
                        SobekCM_Database.Delete_User_Search(folder_id_int, RequestSpecificValues.Tracer);
                }

                HttpContext.Current.Response.Redirect(HttpContext.Current.Items["Original_URL"].ToString(), false);
                HttpContext.Current.ApplicationInstance.CompleteRequest();
                RequestSpecificValues.Current_Mode.Request_Completed = true;
            }
        }
开发者ID:Elkolt,项目名称:SobekCM-Web-Application,代码行数:27,代码来源:Saved_Searches_MySobekViewer.cs

示例6: Advanced_Search_AggregationViewer

        /// <summary> Constructor for a new instance of the Advanced_Search_AggregationViewer class </summary>
        /// <param name="RequestSpecificValues"> All the necessary, non-global data specific to the current request </param>
        public Advanced_Search_AggregationViewer(RequestCache RequestSpecificValues)
            : base(RequestSpecificValues)
        {
            // Compute the redirect stem to use
            string fields = RequestSpecificValues.Current_Mode.Search_Fields;
            string searchCollections = RequestSpecificValues.Current_Mode.SubAggregation;
            Display_Mode_Enum lastMode = RequestSpecificValues.Current_Mode.Mode;
            Aggregation_Type_Enum aggrType = RequestSpecificValues.Current_Mode.Aggregation_Type;
            RequestSpecificValues.Current_Mode.SubAggregation = String.Empty;
            string searchString = RequestSpecificValues.Current_Mode.Search_String;

            RequestSpecificValues.Current_Mode.Search_String = String.Empty;
            RequestSpecificValues.Current_Mode.Search_Fields = String.Empty;
            RequestSpecificValues.Current_Mode.Mode = Display_Mode_Enum.Results;
            RequestSpecificValues.Current_Mode.Search_Precision = Search_Precision_Type_Enum.Inflectional_Form;
            string redirectStem = UrlWriterHelper.Redirect_URL(RequestSpecificValues.Current_Mode);

            RequestSpecificValues.Current_Mode.Mode = Display_Mode_Enum.Aggregation;
            RequestSpecificValues.Current_Mode.Aggregation_Type = Aggregation_Type_Enum.Browse_Info;
            RequestSpecificValues.Current_Mode.Info_Browse_Mode = "all";
            string browse_url = UrlWriterHelper.Redirect_URL(RequestSpecificValues.Current_Mode);

            RequestSpecificValues.Current_Mode.Search_String = searchString;
            RequestSpecificValues.Current_Mode.Search_Fields = fields;
            RequestSpecificValues.Current_Mode.SubAggregation = searchCollections;
            RequestSpecificValues.Current_Mode.Mode = lastMode;
            RequestSpecificValues.Current_Mode.Aggregation_Type = aggrType;
            Search_Script_Action = "advanced_search_sobekcm('" + redirectStem + "','" + browse_url + "')";
        }
开发者ID:Elkolt,项目名称:SobekCM-Web-Application,代码行数:31,代码来源:Advanced_Search_AggregationViewer.cs

示例7: Builder_AdminViewer

        /// <summary> Constructor for a new instance of the Builder_AdminViewer class </summary>
        /// <param name="RequestSpecificValues"> All the necessary, non-global data specific to the current request </param>
        public Builder_AdminViewer(RequestCache RequestSpecificValues)
            : base(RequestSpecificValues)
        {
            // Ensure the user is the system admin
            if ((RequestSpecificValues.Current_User == null) || ((!RequestSpecificValues.Current_User.Is_System_Admin) && (!RequestSpecificValues.Current_User.Is_Portal_Admin )))
            {
                RequestSpecificValues.Current_Mode.Mode = Display_Mode_Enum.My_Sobek;
                RequestSpecificValues.Current_Mode.My_Sobek_Type = My_Sobek_Type_Enum.Home;
                UrlWriterHelper.Redirect(RequestSpecificValues.Current_Mode);
                return;
            }

               // If this is a postback, handle any events first
            if (RequestSpecificValues.Current_Mode.isPostBack)
            {
                if (((RequestSpecificValues.Current_User.Is_System_Admin) && (!UI_ApplicationCache_Gateway.Settings.isHosted)) ||
                    (RequestSpecificValues.Current_User.Is_Host_Admin))
                {
                    // Pull the hidden value
                    string save_value = HttpContext.Current.Request.Form["admin_builder_tosave"].ToUpper().Trim();
                    if (save_value.Length > 0)
                    {
                        // Set this value
                        SobekCM_Database.Set_Setting("Builder Operation Flag", save_value);
                        UrlWriterHelper.Redirect(RequestSpecificValues.Current_Mode);
                    }
                }
            }
        }
开发者ID:Elkolt,项目名称:SobekCM-Web-Application,代码行数:31,代码来源:Builder_AdminViewer.cs

示例8: Print_Item_HtmlSubwriter

        /// <summary> Constructor for a new instancee of the Print_Item_HtmlSubwriter class </summary>
        /// <param name="RequestSpecificValues"> All the necessary, non-global data specific to the current request </param>
        public Print_Item_HtmlSubwriter(RequestCache RequestSpecificValues)
            : base(RequestSpecificValues)
        {
            // Check for IP restriction
            restriction_message = String.Empty;
            if (RequestSpecificValues.Current_Item.Behaviors.IP_Restriction_Membership > 0)
            {
                if (HttpContext.Current != null)
                {
                    int user_mask = (int)HttpContext.Current.Session["IP_Range_Membership"];
                    int comparison = RequestSpecificValues.Current_Item.Behaviors.IP_Restriction_Membership & user_mask;
                    if (comparison == 0)
                    {
                        int restriction = RequestSpecificValues.Current_Item.Behaviors.IP_Restriction_Membership;
                        int restriction_counter = 1;
                        while (restriction % 2 != 1)
                        {
                            restriction = restriction >> 1;
                            restriction_counter++;
                        }
                        if (UI_ApplicationCache_Gateway.IP_Restrictions[restriction_counter] != null)
                            restriction_message = UI_ApplicationCache_Gateway.IP_Restrictions[restriction_counter].Item_Restricted_Statement;
                        else
                            restriction_message = "Restricted Item";
                    }
                }
            }

            isRestricted = restriction_message.Length > 0;
        }
开发者ID:Elkolt,项目名称:SobekCM-Web-Application,代码行数:32,代码来源:Print_Item_HtmlSubwriter.cs

示例9: Permissions_Reports_AdminViewer

        /// <summary> Constructor for a new version of the <see cref="Permissions_Reports_AdminViewer"/> class. </summary>
        /// <param name="RequestSpecificValues">All the necessary, non-global data specific to the current request</param>
        public Permissions_Reports_AdminViewer(RequestCache RequestSpecificValues)
            : base(RequestSpecificValues)
        {
            RequestSpecificValues.Tracer.Add_Trace("Permissions_Reports_AdminViewer.Constructor", String.Empty);
            actionMessage = String.Empty;

            // Ensure the user is the system admin
            if ((RequestSpecificValues.Current_User == null) || (!RequestSpecificValues.Current_User.Is_System_Admin))
            {
                RequestSpecificValues.Current_Mode.Mode = Display_Mode_Enum.My_Sobek;
                RequestSpecificValues.Current_Mode.My_Sobek_Type = My_Sobek_Type_Enum.Home;
                UrlWriterHelper.Redirect(RequestSpecificValues.Current_Mode);
                return;
            }

            // If this is posted back, look for the reset
            if (RequestSpecificValues.Current_Mode.isPostBack)
            {
                string reset_value = HttpContext.Current.Request.Form[""];
                if ((!String.IsNullOrEmpty(reset_value)) && (reset_value == "reset"))
                {
                    // Just ensure everything is emptied out
                    HttpContext.Current.Cache.Remove("GlobalPermissionsReport");
                    HttpContext.Current.Cache.Remove("GlobalPermissionsUsersLinked");
                    HttpContext.Current.Cache.Remove("GlobalPermissionsLinkedAggr");
                    HttpContext.Current.Cache.Remove("GlobalPermissionsReportSubmit");
                }
            }
        }
开发者ID:MarkVSullivan,项目名称:SobekCM-Web-Application,代码行数:31,代码来源:Permissions_Reports_AdminViewer.cs

示例10: Add_Footer

        /// <summary> Add the header to the output </summary>
        /// <param name="Output"> Stream to which to write the HTML for this header </param>
        /// <param name="RequestSpecificValues"> All the necessary, non-global data specific to the current request </param>
        /// <param name="Behaviors"> List of behaviors from the html subwriters </param>
        public static void Add_Footer(TextWriter Output, RequestCache RequestSpecificValues, List<HtmlSubwriter_Behaviors_Enum> Behaviors)
        {
            // Determine which header and footer to display
            bool useItemFooter = (RequestSpecificValues.Current_Mode.Mode == Display_Mode_Enum.Item_Display) || (RequestSpecificValues.Current_Mode.Mode == Display_Mode_Enum.Item_Print) || ((Behaviors != null) && (Behaviors.Contains(HtmlSubwriter_Behaviors_Enum.MySobek_Subwriter_Mimic_Item_Subwriter)));

            // Get the current contact URL
            Display_Mode_Enum thisMode = RequestSpecificValues.Current_Mode.Mode;
            RequestSpecificValues.Current_Mode.Mode = Display_Mode_Enum.Contact;
            string contact = UrlWriterHelper.Redirect_URL(RequestSpecificValues.Current_Mode);

            // Restore the old mode
            RequestSpecificValues.Current_Mode.Mode = thisMode;

            // Get the URL options
            string url_options = UrlWriterHelper.URL_Options(RequestSpecificValues.Current_Mode);
            string urlOptions1 = String.Empty;
            string urlOptions2 = String.Empty;
            if (url_options.Length > 0)
            {
                urlOptions1 = "?" + url_options;
                urlOptions2 = "&" + url_options;
            }

            // Get the base url
            string base_url = RequestSpecificValues.Current_Mode.Base_URL;
            if (RequestSpecificValues.Current_Mode.Writer_Type == Writer_Type_Enum.HTML_LoggedIn)
                base_url = base_url + "l/";

            // Get the skin url
            string skin_url = RequestSpecificValues.Current_Mode.Base_Design_URL + "skins/" + RequestSpecificValues.HTML_Skin.Skin_Code + "/";

            bool end_div = !((RequestSpecificValues.Current_Mode.Mode == Display_Mode_Enum.Simple_HTML_CMS) && (RequestSpecificValues.Site_Map != null));

            string version = UI_ApplicationCache_Gateway.Settings.Current_Web_Version;
            if (version.IndexOf(" ") > 0)
                version = version.Split(" ".ToCharArray())[0];

            if (useItemFooter)
            {
                Output.WriteLine(RequestSpecificValues.HTML_Skin.Footer_Item_HTML.Replace("<%CONTACT%>", contact).Replace("<%URLOPTS%>", url_options).Replace("<%?URLOPTS%>", urlOptions1).Replace("<%&URLOPTS%>", urlOptions2).Replace("<%VERSION%>", version).Replace("<%BASEURL%>", base_url).Replace("<%SKINURL%>", skin_url).Replace("<%INSTANCENAME%>", RequestSpecificValues.Current_Mode.Instance_Name).Trim());
            }
            else
            {
                if (( RequestSpecificValues.HTML_Skin.Footer_Has_Container_Directive.HasValue) && (RequestSpecificValues.HTML_Skin.Footer_Has_Container_Directive.Value))
                {
                    if (!end_div)
                        Output.WriteLine(RequestSpecificValues.HTML_Skin.Footer_HTML.Replace("<%CONTACT%>", contact).Replace("<%URLOPTS%>", url_options).Replace("<%?URLOPTS%>", urlOptions1).Replace("<%&URLOPTS%>", urlOptions2).Replace("<%VERSION%>", version).Replace("<%BASEURL%>", base_url).Replace("<%SKINURL%>", skin_url).Replace("<%CONTAINER%>", "").Replace("<%INSTANCENAME%>", RequestSpecificValues.Current_Mode.Instance_Name).Trim());
                    else
                        Output.WriteLine(RequestSpecificValues.HTML_Skin.Footer_HTML.Replace("<%CONTACT%>", contact).Replace("<%URLOPTS%>", url_options).Replace("<%?URLOPTS%>", urlOptions1).Replace("<%&URLOPTS%>", urlOptions2).Replace("<%VERSION%>", version).Replace("<%BASEURL%>", base_url).Replace("<%SKINURL%>", skin_url).Replace("<%CONTAINER%>", "</div>").Replace("<%INSTANCENAME%>", RequestSpecificValues.Current_Mode.Instance_Name).Trim());
                }
                else
                {
                    if (!end_div)
                        Output.WriteLine(RequestSpecificValues.HTML_Skin.Footer_HTML.Replace("<%CONTACT%>", contact).Replace("<%URLOPTS%>", url_options).Replace("<%?URLOPTS%>", urlOptions1).Replace("<%&URLOPTS%>", urlOptions2).Replace("<%VERSION%>", version).Replace("<%BASEURL%>", base_url).Replace("<%SKINURL%>", skin_url).Replace("<%INSTANCENAME%>", RequestSpecificValues.Current_Mode.Instance_Name).Trim());
                    else
                        Output.WriteLine(RequestSpecificValues.HTML_Skin.Footer_HTML.Replace("<%CONTACT%>", contact).Replace("<%URLOPTS%>", url_options).Replace("<%?URLOPTS%>", urlOptions1).Replace("<%&URLOPTS%>", urlOptions2).Replace("<%VERSION%>", version).Replace("<%BASEURL%>", base_url).Replace("<%SKINURL%>", skin_url).Replace("<%INSTANCENAME%>", RequestSpecificValues.Current_Mode.Instance_Name).Trim() + Environment.NewLine + "</div>");
                }
            }
        }
开发者ID:Elkolt,项目名称:SobekCM-Web-Application,代码行数:63,代码来源:HeaderFooter_Helper_HtmlSubWriter.cs

示例11: NewPassword_MySobekViewer

        /// <summary> Constructor for a new instance of the NewPassword_MySobekViewer class </summary>
        /// <param name="RequestSpecificValues"> All the necessary, non-global data specific to the current request </param>
        public NewPassword_MySobekViewer(RequestCache RequestSpecificValues)
            : base(RequestSpecificValues)
        {
            RequestSpecificValues.Tracer.Add_Trace("NewPassword_MySobekViewer.Constructor", String.Empty);

            // Do nothing
            validationErrors = new List<string>();
        }
开发者ID:Elkolt,项目名称:SobekCM-Web-Application,代码行数:10,代码来源:NewPassword_MySobekViewer.cs

示例12: Private_Items_AggregationViewer

        /// <summary> Constructor for a new instance of the Private_Items_AggregationViewer class </summary>
        /// <param name="RequestSpecificValues"> All the necessary, non-global data specific to the current request </param>
        public Private_Items_AggregationViewer(RequestCache RequestSpecificValues)
            : base(RequestSpecificValues)
        {
            // Ensure user has some permissions on this aggregation, or is a power/internal user or admin before showing
            // them this list
            if ((RequestSpecificValues.Current_User == null) || (!RequestSpecificValues.Current_User.LoggedOn))
            {
                RequestSpecificValues.Current_Mode.Aggregation_Type = Aggregation_Type_Enum.Home;
                UrlWriterHelper.Redirect(RequestSpecificValues.Current_Mode);
                return;
            }

            // Does this user have permissions on this itgem
            if (RequestSpecificValues.Current_User.PermissionedAggregations != null)
            {
                // Do they have some special permissions against this aggregation?
                bool special_permissions_found = false;
                foreach (User_Permissioned_Aggregation permissions in RequestSpecificValues.Current_User.PermissionedAggregations)
                {
                    if (String.Compare(permissions.Code, RequestSpecificValues.Hierarchy_Object.Code, StringComparison.OrdinalIgnoreCase) == 0)
                    {
                        if ((permissions.CanChangeVisibility) || (permissions.CanDelete) || (permissions.CanEditBehaviors) || (permissions.CanEditItems) ||
                            (permissions.CanEditMetadata) || (permissions.CanPerformQc) || (permissions.CanUploadFiles) || (permissions.IsAdmin) || (permissions.IsCurator))
                        {
                            special_permissions_found = true;
                            break;
                        }
                    }
                }

                // Are they a portal/system admin or power user?
                if ((!special_permissions_found) && ((RequestSpecificValues.Current_User.Is_Internal_User) || (RequestSpecificValues.Current_User.Is_Portal_Admin) || (RequestSpecificValues.Current_User.Is_System_Admin)))
                    special_permissions_found = true;

                // If no permissions, forward them back
                if (!special_permissions_found)
                {
                    RequestSpecificValues.Current_Mode.Aggregation_Type = Aggregation_Type_Enum.Home;
                    UrlWriterHelper.Redirect(RequestSpecificValues.Current_Mode);
                    return;
                }
            }
            else
            {
                // Are they a portal/system admin or power user?
                if ((!RequestSpecificValues.Current_User.Is_Internal_User) && (!RequestSpecificValues.Current_User.Is_Portal_Admin) && (!RequestSpecificValues.Current_User.Is_System_Admin))
                {
                    RequestSpecificValues.Current_Mode.Aggregation_Type = Aggregation_Type_Enum.Home;
                    UrlWriterHelper.Redirect(RequestSpecificValues.Current_Mode);
                    return;
                }
            }

            // Get the list of private items
            int current_sort = RequestSpecificValues.Current_Mode.Sort.HasValue ? RequestSpecificValues.Current_Mode.Sort.Value : 0;
            int current_page = RequestSpecificValues.Current_Mode.Page.HasValue ? RequestSpecificValues.Current_Mode.Page.Value : 1;
            privateItems = SobekCM_Database.Tracking_Get_Aggregation_Private_Items(RequestSpecificValues.Hierarchy_Object.Code, (int)RESULTS_PER_PAGE, current_page, current_sort, RequestSpecificValues.Tracer);
        }
开发者ID:Elkolt,项目名称:SobekCM-Web-Application,代码行数:60,代码来源:Private_Items_AggregationViewer.cs

示例13: Search_Results_HtmlSubwriter

 /// <summary> Constructor for a new instance of the Search_Results_HtmlSubwriter class </summary>
 /// <param name="RequestSpecificValues"> All the necessary, non-global data specific to the current request </param>
 public Search_Results_HtmlSubwriter(RequestCache RequestSpecificValues)
     : base(RequestSpecificValues)
 {
     // Use the method in the base class to actually pull the entire hierarchy
     if (!Get_Collection(RequestSpecificValues.Current_Mode, RequestSpecificValues.Tracer, out hierarchyObject))
     {
         RequestSpecificValues.Current_Mode.Mode = Display_Mode_Enum.Error;
     }
 }
开发者ID:MarkVSullivan,项目名称:SobekCM-Web-Application,代码行数:11,代码来源:Search_Results_HtmlSubwriter.cs

示例14: Get_Viewer

        /// <summary> Returns a built collection viewer matching request </summary>
        /// <param name="ViewType"> Aggregation view type </param>
        /// <param name="RequestSpecificValues"> All the necessary, non-global data specific to the current request </param>
        /// <returns> Collection viewer that extends the <see cref="abstractAggregationViewer"/> class. </returns>
        public static abstractAggregationViewer Get_Viewer(Item_Aggregation_Views_Searches_Enum ViewType, RequestCache RequestSpecificValues )
        {
            switch (ViewType)
            {
                case Item_Aggregation_Views_Searches_Enum.Advanced_Search:
                    return new Advanced_Search_AggregationViewer(RequestSpecificValues);

                case Item_Aggregation_Views_Searches_Enum.Advanced_Search_MimeType:
                    return new Advanced_Search_MimeType_AggregationViewer(RequestSpecificValues);

                case Item_Aggregation_Views_Searches_Enum.Advanced_Search_YearRange:
                    return new Advanced_Search_YearRange_AggregationViewer(RequestSpecificValues);

                case Item_Aggregation_Views_Searches_Enum.Basic_Search:
                    Item_Aggregation_Front_Banner frontBannerImage = RequestSpecificValues.Hierarchy_Object.FrontBannerObj;
                    if ((frontBannerImage != null) && (RequestSpecificValues.Hierarchy_Object.Highlights != null ) && (RequestSpecificValues.Hierarchy_Object.Highlights.Count > 0))
                    {
                        return new Rotating_Highlight_Search_AggregationViewer(RequestSpecificValues);
                    }
                    return new Basic_Search_AggregationViewer(RequestSpecificValues);

                case Item_Aggregation_Views_Searches_Enum.Basic_Search_YearRange:
                    return new Basic_Search_YearRange_AggregationViewer(RequestSpecificValues);

                case Item_Aggregation_Views_Searches_Enum.Basic_Search_FullTextOption:
                    return new Basic_Text_Search_Combined_AggregationViewer(RequestSpecificValues);

                case Item_Aggregation_Views_Searches_Enum.Basic_Search_MimeType:
                    Item_Aggregation_Front_Banner frontBannerImage2 = RequestSpecificValues.Hierarchy_Object.FrontBannerObj;
                    if ((frontBannerImage2 != null) && (RequestSpecificValues.Hierarchy_Object.Highlights != null) && (RequestSpecificValues.Hierarchy_Object.Highlights.Count > 0))
                    {
                        return new Rotating_Highlight_MimeType_AggregationViewer(RequestSpecificValues);
                    }
                    return new Basic_Search_MimeType_AggregationViewer(RequestSpecificValues);

                case Item_Aggregation_Views_Searches_Enum.FullText_Search:
                    return new Full_Text_Search_AggregationViewer(RequestSpecificValues);

                case Item_Aggregation_Views_Searches_Enum.No_Home_Search:
                    return new No_Search_AggregationViewer(RequestSpecificValues);

                case Item_Aggregation_Views_Searches_Enum.Newspaper_Search:
                    return new Newspaper_Search_AggregationViewer(RequestSpecificValues);

                case Item_Aggregation_Views_Searches_Enum.Map_Search:
                    return new Map_Search_AggregationViewer(RequestSpecificValues);

                case Item_Aggregation_Views_Searches_Enum.Map_Search_Beta:
                    return new Map_Search_AggregationViewer_Beta(RequestSpecificValues);

                case Item_Aggregation_Views_Searches_Enum.DLOC_FullText_Search:
                    return new dLOC_Search_AggregationViewer(RequestSpecificValues);

                default:
                    return null;
            }
        }
开发者ID:Elkolt,项目名称:SobekCM-Web-Application,代码行数:61,代码来源:AggregationViewer_Factory.cs

示例15: Metadata_Browse_AggregationViewer

        /// <summary> Constructor for a new instance of the Metadata_Browse_AggregationViewer class </summary>
        /// <param name="RequestSpecificValues"> All the necessary, non-global data specific to the current request </param>
        /// <param name="ViewBag"> Aggregation-specific request information, such as aggregation object and any browse object requested </param>
        public Metadata_Browse_AggregationViewer(RequestCache RequestSpecificValues, AggregationViewBag ViewBag)
            : base(RequestSpecificValues, ViewBag)
        {
            // If there is not info browse mode listed, use the default
            if ( String.IsNullOrEmpty(RequestSpecificValues.Current_Mode.Info_Browse_Mode))
            {
                string defaultBrowseBy = ViewBag.Hierarchy_Object.Default_BrowseBy ?? String.Empty;
                RequestSpecificValues.Current_Mode.Info_Browse_Mode = defaultBrowseBy;

                // Still length of zero?
                if (String.IsNullOrEmpty(RequestSpecificValues.Current_Mode.Info_Browse_Mode))
                {
                    // Just look for the first browse by
                    foreach (Item_Aggregation_Child_Page browse in ViewBag.Hierarchy_Object.Child_Pages)
                    {
                        if (browse.Browse_Type == Item_Aggregation_Child_Visibility_Enum.Metadata_Browse_By)
                        {
                            RequestSpecificValues.Current_Mode.Info_Browse_Mode = browse.Code;
                            break;
                        }
                    }
                }

            }

            if ((String.IsNullOrEmpty(RequestSpecificValues.Current_Mode.Info_Browse_Mode)) && (ViewBag.Hierarchy_Object.Has_Browse_By_Pages))
                RequestSpecificValues.Current_Mode.Info_Browse_Mode = ViewBag.Hierarchy_Object.Child_Page_By_Code(RequestSpecificValues.Current_Mode.Info_Browse_Mode).Code;

            // Get this browse
            browseObject = ViewBag.Hierarchy_Object.Child_Page_By_Code(RequestSpecificValues.Current_Mode.Info_Browse_Mode);

            // Was this a metadata browseby, or just a static html?
            if (( browseObject == null ) || ( browseObject.Source_Data_Type != Item_Aggregation_Child_Source_Data_Enum.Static_HTML))
            {
                // Determine the correct metadata code
                string metadata_code = RequestSpecificValues.Current_Mode.Info_Browse_Mode.Trim().Replace("_", " ");
                RequestSpecificValues.Current_Mode.Info_Browse_Mode = metadata_code;

                // Only get values if there was a metadata code
                if (metadata_code.Length > 0)
                {
                    // Check the cache for this value
                    List<string> cacheInstance = CachedDataManager.Retrieve_Aggregation_Metadata_Browse(RequestSpecificValues.Current_Mode.Aggregation, RequestSpecificValues.Current_Mode.Info_Browse_Mode, RequestSpecificValues.Tracer);

                    if (cacheInstance != null)
                    {
                        results = cacheInstance;
                    }
                    else
                    {
                        results = Engine_Database.Get_Item_Aggregation_Metadata_Browse(RequestSpecificValues.Current_Mode.Aggregation, RequestSpecificValues.Current_Mode.Info_Browse_Mode, RequestSpecificValues.Tracer);
                        CachedDataManager.Store_Aggregation_Metadata_Browse(RequestSpecificValues.Current_Mode.Aggregation, RequestSpecificValues.Current_Mode.Info_Browse_Mode, results, RequestSpecificValues.Tracer);
                    }
                }
            }
        }
开发者ID:MarkVSullivan,项目名称:SobekCM-Web-Application,代码行数:59,代码来源:Metadata_Browse_AggregationViewer.cs


注:本文中的RequestCache类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。