• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C# SessionData类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: TestNoArgs

		public void TestNoArgs()
		{
			SessionData s = Classes.CLI.ParseCLIArguments(new string[]{});
			SessionData result = new SessionData();
			Assert.AreEqual(result.GetType(), s.GetType());
			
		}
开发者ID:kleopatra999,项目名称:superputty,代码行数:7,代码来源:CLI.cs


示例2: OnPropertyChanged

        private void OnPropertyChanged(SessionData Session, String AttributeName)
        {
            if (Session == null)
                return;

            sessionDetailPropertyGrid.Refresh();
        }
开发者ID:simono74,项目名称:superputty-1,代码行数:7,代码来源:SessionDetail.cs


示例3: loadCalendar

        private void loadCalendar()
        {
            Home frmchild = new Home();
            SessionData sesh;
            string filepath;
            calRef = new List<CalendarRef>();
            DirectoryInfo dinfo = new DirectoryInfo(@"C:\Users\Jack\Documents\GitHub\CycleAnalysis\CycleDataReader\Data");
            FileInfo[] Files = dinfo.GetFiles("*.txt");

            foreach (FileInfo file in Files)
            {
                filepath = file.Directory + "\\" + file.ToString();

                frmchild = new Home();
                frmchild.LoadingFile(filepath);
                sesh = new SessionData();
                sesh = frmchild.getSession();

                // Makes a calendar ref for later
                CalendarRef calendar = new CalendarRef(sesh, filepath);
                calRef.Add(calendar);

                monthCalendar1.AddBoldedDate(sesh.getDateTime());
            }

            for (int i = 0; i < calRef.Count; i++)
            {
                Console.WriteLine(calRef[i].getSession().getDateTime().Date);
            }
        }
开发者ID:jackwren,项目名称:CycleAnalysis,代码行数:30,代码来源:Calendar.cs


示例4: GetSessionFactory

        public ISessionFactory GetSessionFactory(long orderId)
        {
            lock (_orderSessionsDict)
            {
                ISessionFactory sessionFactory = null;

                if (_orderSessionsDict.ContainsKey(orderId))
                {
                    var sessiondata = _orderSessionsDict[orderId];

                    sessiondata.LastUsed = DateTime.Now;

                    sessionFactory = sessiondata.SessionFactory;
                }

                if (sessionFactory == null)
                {
                    sessionFactory = BuildSessionFactory(orderId);

                    _orderSessionsDict[orderId] = new SessionData
                    {
                        LastUsed = DateTime.Now,
                        SessionFactory = sessionFactory
                    };
                }

                var sessionFactoriesToDelete = _orderSessionsDict.Where(x => x.Value.LastUsed < DateTime.Now.AddHours(-1)).Select(x => x.Key).ToList();

                sessionFactoriesToDelete.ForEach(x => _orderSessionsDict.Remove(x));

                return sessionFactory;
            }
        }
开发者ID:1aia,项目名称:code-samples,代码行数:33,代码来源:SQLitePerOrderProvider.cs


示例5: Simulator

        private Simulator()
        {
            _drivers = new DriverContainerCollection();
            _sessionData = new SessionData();

            Connection.Instance.SessionInfoUpdated += SdkOnSessionInfoUpdated;
            Connection.Instance.TelemetryUpdated += SdkOnTelemetryUpdated;
        }
开发者ID:jrc60752,项目名称:iRacingAdminSync,代码行数:8,代码来源:Simulator.cs


示例6: GetInstance

    public static SessionData GetInstance()
    {
        if (m_instance == null)
        {
            m_instance = new SessionData();
        }

        return m_instance;
    }
开发者ID:ltloibrights,项目名称:AsyncRPG,代码行数:9,代码来源:SessionData.cs


示例7: GenerateLoginRequest

 private static IDictionary<string, string> GenerateLoginRequest(SessionData sessionData, string user, string pass)
     => new Dictionary<string, string>
     {
         { "lt", sessionData.Lt },
         { "execution", sessionData.Execution },
         { "_eventId", "submit" },
         { "username", user },
         { "password", pass }
     };
开发者ID:RickardPettersson,项目名称:Pokemon-Go-Rocket-API,代码行数:9,代码来源:PtcLogin.cs


示例8: it_skips_a_two_zero_frame

        public void it_skips_a_two_zero_frame()
        {
            var s = new SessionData { SessionInfo = new SessionData._SessionInfo { Sessions = new[] { new SessionData._SessionInfo._Sessions() } } };

            var inputSamples = CreateSamplesFromFrameNumbers(s, 1, 2, 3, 0, 0, 4, 5);

            var samples = iRacingSDK.DataSampleExtensions.VerifyReplayFrames(inputSamples).ToList();

            Assert.That(FrameNumbersFromSamples(samples), Is.EqualTo(new[] { 1, 2, 3, 4, 5 }));
        }
开发者ID:jrc60752,项目名称:iRacingSDK.Net,代码行数:10,代码来源:VerifyReplayFrame.cs


示例9: GetLoginTicket

        private static async Task<string> GetLoginTicket(string username, string password, System.Net.Http.HttpClient tempHttpClient, SessionData sessionData)
        {
            HttpResponseMessage loginResp;
            var loginRequest = GenerateLoginRequest(sessionData, username, password);
            using (var formUrlEncodedContent = new FormUrlEncodedContent(loginRequest))
            {
                loginResp = await tempHttpClient.PostAsync(Resources.PtcLoginUrl, formUrlEncodedContent).ConfigureAwait(false);
            }

            var ticketId = ExtracktTicketFromResponse(loginResp);
            return ticketId;
        }
开发者ID:RickardPettersson,项目名称:Pokemon-Go-Rocket-API,代码行数:12,代码来源:PtcLogin.cs


示例10: it_skips_if_no_matching_session

        public void it_skips_if_no_matching_session()
        {
            var s = new SessionData { SessionInfo = new SessionData._SessionInfo { Sessions = new[] { new SessionData._SessionInfo._Sessions() } } };

            var inputSamples = CreateSamplesFromFrameNumbers(s, 1, 2, 3, 4, 5);

            inputSamples.First().Telemetry["SessionNum"] = 1;
               
            var samples = iRacingSDK.DataSampleExtensions.VerifyReplayFrames(inputSamples).ToList();

            Assert.That(FrameNumbersFromSamples(samples), Is.EqualTo(new [] { 2, 3, 4, 5 }));
        }
开发者ID:jrc60752,项目名称:iRacingSDK.Net,代码行数:12,代码来源:VerifyReplayFrame.cs


示例11: SelectedSessionChanged

 private void SelectedSessionChanged(SessionData Session)
 {
     SessionData OldSession = sessionDetailPropertyGrid.SelectedObject as SessionData;
     if (OldSession != null)
     {
         OldSession.OnPropertyChanged -= OnPropertyChanged;
     }
     sessionDetailPropertyGrid.SelectedObject = Session;
     if (Session != null)
     {
         Session.OnPropertyChanged += OnPropertyChanged;
     }
 }
开发者ID:simono74,项目名称:superputty-1,代码行数:13,代码来源:SessionDetail.cs


示例12: RemoteFileListPanel

        public RemoteFileListPanel(PscpTransfer transfer, DockPanel dockPanel, SessionData session)
        {
            Log.InfoFormat("Started new File Transfer Session for {0}", session.SessionName);
            m_Session = session;
            m_DockPanel = dockPanel;
            m_Transfer = transfer;
            m_MouseFollower = new dlgMouseFeedback();
            InitializeComponent();
            
            this.TabText = session.SessionName;

            LoadDirectory(m_Path);
        }
开发者ID:mesenger,项目名称:superputty,代码行数:13,代码来源:RemoteFileListPanel.cs


示例13: ctlPuttyPanel

        public ctlPuttyPanel(SessionData session, PuttyClosedCallback callback)
        {
            m_Session = session;
            m_ApplicationExit = callback;
            m_puttyStartInfo = new PuttyStartInfo(session);

            InitializeComponent();

            this.Text = session.SessionName;
            this.TabText = session.SessionName;
            this.TextOverride = session.SessionName;

            CreatePanel();
            AdjustMenu();
        }
开发者ID:bclark00,项目名称:superputty,代码行数:15,代码来源:ctlPuttyPanel.cs


示例14: Session

        public Session(
			SessionManagerHandler sessionManagerHandler, 
			FileHandlerFactoryLocator fileHandlerFactoryLocator,
			PersistedObject<Dictionary<ID<ISession, Guid>, SessionData>> persistedSessionDatas,
			ID<ISession, Guid> sessionId,
			SessionData sessionData)
        {
            this.sessionManagerHandler = sessionManagerHandler;
            this.fileHandlerFactoryLocator = fileHandlerFactoryLocator;
            this.persistedSessionDatas = persistedSessionDatas;
            this.sessionId = sessionId;

            this.maxAge = sessionData.maxAge;
            this.lastQuery = sessionData.lastQuery;
            this.keepAlive = sessionData.keepAlive;
        }
开发者ID:GWBasic,项目名称:ObjectCloud,代码行数:16,代码来源:Session.cs


示例15: AddModelSystem

 /// <summary>
 /// Add a model system to the project
 /// </summary>
 /// <param name="modelSystem">The model system to add to the project</param>
 /// <param name="error">An error message in case of failure</param>
 /// <returns>True if the model system was added successfully</returns>
 public bool AddModelSystem(ModelSystem modelSystem, ref string error)
 {
     if(modelSystem == null)
     {
         throw new ArgumentNullException("modelSystem");
     }
     lock (EditingSessionsLock)
     {
         if(!this.Project.AddModelSystem(modelSystem, ref error))
         {
             return false;
         }
         var temp = new SessionData[EditingSessions.Length + 1];
         Array.Copy(EditingSessions, temp, EditingSessions.Length);
         EditingSessions = temp;
         return true;
     }
 }
开发者ID:Cocotus,项目名称:XTMF,代码行数:24,代码来源:ProjectEditingSession.cs


示例16: SampleSessionDataSource

 public SampleSessionDataSource()
 {
     Session = new SessionData
     {
         Title = "The Awesomeness Factor: Taking your Greatness to 11",
         //Image = new BitmapImage(new Uri("http://qedcode.com/extras/Perry_Headshot_Medium.jpg", UriKind.Absolute)),
         Day = "Sat",
         Time = "2:30",
         Room = "Room: Vestibule on the Square",
         Track = "Architecture",
         Description = "When you are this awesome, it can't get any better, right?\n\nWrong!\n\nYou can always get more awesome! We'll show you how. You can multiply your greatness by the awesome factor. This will make you even more awesome than you already are. We'll give you three actionable recommendations for cranking up your greatness to 11.\n\nGo team awesome!",
         Speaker = "Michael L Perry",
         SpeakerBio = "Software is math. Michael L Perry has built upon the works of mathematicians like Bertrand Meyer, James Rumbaugh, and Donald Knuth to develop a mathematical system for software development. He has captured this system in a set of open source projects, Update Controls and Correspondence. As a Principal Consultant at Improving Enterprises, he applies mathematical concepts to building scalable and robust enterprise systems. You can find out more at qedcode.com.",
         AddVisible = Visibility.Visible,
         RemoveVisible = Visibility.Collapsed
         //StatusBrush = Application.Current.Resources["UnscheduledStatusBrush"] as Brush
     };
 }
开发者ID:michaellperry,项目名称:MyCon,代码行数:18,代码来源:SampleSessionDataSource.cs


示例17: CreateSamplesFromFrameNumbers

        DataSample[] CreateSamplesFromFrameNumbers(SessionData s, params int[] frameNumbers)
        {
            DataSample lastSample = null;

            return frameNumbers.Select(n =>
                {
                    var sample = new DataSample
                    {
                        IsConnected = true,
                        Telemetry = new Telemetry
                        {
                            { "SessionNum", 0 },
                            { "ReplayFrameNum", n }
                        },
                        LastSample = lastSample
                    };

                    sample.Telemetry.SessionData = s;
                    lastSample = sample;
                    return sample;
                }
            ).ToArray();
        }
开发者ID:jrc60752,项目名称:iRacingSDK.Net,代码行数:23,代码来源:VerifyReplayFrame.cs


示例18: CreatesSamplesForDistancesOf

        static DataSample[] CreatesSamplesForDistancesOf(params float[] distances)
        {
            var laps = distances.Select(d => (int)d).ToArray();
            var distPcts = distances.Select(d => d - (float)(int)d).ToArray();

            var s = new SessionData { DriverInfo = new SessionData._DriverInfo { Drivers = new[] { new SessionData._DriverInfo._Drivers { UserName = "Test", CarNumberRaw = 1 } } } };

            var result = new List<DataSample>();

            for (int i = 0; i < laps.Length; i++)
                result.Add(new DataSample
                {
                    IsConnected = true,
                    SessionData = s,
                    Telemetry = new Telemetry {	
                        { "CarIdxLap",	new[] { laps[i] }	}, 
                        { "CarIdxLapDistPct", new[] { distPcts[i] } },
                        { "CarIdxTrackSurface", new[] { TrackLocation.OnTrack } },
                        { "ReplayFrameNum", 10 + i }
                    }
                });

            return result.ToArray();
        }
开发者ID:jrc60752,项目名称:iRacingSDK.Net,代码行数:24,代码来源:WithCorrectedPercentages.cs


示例19: MakeArgs

        static string MakeArgs(SessionData session, bool includePassword, string path)
        {
            string args = "-ls "; // default arguments
            args += (!String.IsNullOrEmpty(session.PuttySession)) ? "-load \"" + session.PuttySession + "\" " : "";
            args += (!String.IsNullOrEmpty(session.Password) && session.Password.Length > 0)
                ? "-pw " + (includePassword ? session.Password : "XXXXX") + " "
                : "";
            args += "-P " + session.Port + " ";
            args += (!String.IsNullOrEmpty(session.Username)) ? session.Username + "@" : "";
            args += session.Host + ":" + path;

            return args;
        }
开发者ID:ngyuki,项目名称:superputty,代码行数:13,代码来源:PscpTransfer.cs


示例20: OpenScpSession

        public static void OpenScpSession(SessionData session)
        {
            Log.InfoFormat("Opening scp session, id={0}", session == null ? "" : session.SessionId);
            if (!IsScpEnabled)
            {
                SuperPuTTY.ReportStatus("Could not open session, pscp not found: {0} [SCP]", session.SessionId);
            }
            else if (session != null)
            {
                PscpBrowserPanel panel = new PscpBrowserPanel(
                    session, new PscpOptions { PscpLocation = Settings.PscpExe },
                    Environment.GetFolderPath(Environment.SpecialFolder.Desktop));
                ApplyDockRestrictions(panel);
                ApplyIconForWindow(panel, session);
                panel.Show(MainForm.DockPanel, session.LastDockstate);

                SuperPuTTY.ReportStatus("Opened session: {0} [SCP]", session.SessionId);
            }
            else
            {
                Log.Warn("Could not open null session");
            }
        }
开发者ID:ngyuki,项目名称:superputty,代码行数:23,代码来源:SuperPuTTY.cs



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# SessionEventArgs类代码示例发布时间:2022-05-24
下一篇:
C# SessionBase类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap