CalendarAggregator.CalendarRenderer.RenderHtmlForMobile C# (CSharp) Метод

RenderHtmlForMobile() публичный Метод

public RenderHtmlForMobile ( CalendarAggregator.ZonelessEventStore eventstore, string view, int count, System.DateTime from, System.DateTime to, string source, object>.Dictionary args ) : string
eventstore CalendarAggregator.ZonelessEventStore
view string
count int
from System.DateTime
to System.DateTime
source string
args object>.Dictionary
Результат string
        public string RenderHtmlForMobile(ZonelessEventStore eventstore, string view, int count, DateTime from, DateTime to, string source, Dictionary<string,object> args)
        {
            //GenUtils.LogMsg("info", "RenderForMobile", JsonConvert.SerializeObject(args));
            this.ResetCounters();

            eventstore = GetEventStore(eventstore, view, count, from, to, source, args);
            count = (int) args["mobile_event_count"];                        // maybe apply further reduction
            eventstore.events = eventstore.events.Take(count).ToList();

            var html = RenderHtmlEventsOnly(eventstore, view, count, from, to, source, args);

            string mobile_long = "";
            string ua = "";
            if (args.ContainsKey("mobile_long") && args.ContainsKey("ua"))
            {
                mobile_long = (string)args["mobile_long"];   // the longest dimension of detected mobile device
                ua = (string)args["ua"];                     // user agent
            }

            html = html.Replace("get_css_theme?", string.Format("get_css_theme?mobile=yes&mobile_long={0}&ua={1}&", mobile_long, ua));

            if ( args.ContainsKey("mobile_detected") && (bool) args["mobile_detected"] )
                html = html.Replace("__MOBILE_NOT_DETECTED__", "__MOBILE_DETECTED__");

            return html;
        }