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


C# SessionData类代码示例

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


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


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