本文整理汇总了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());
}
示例2: OnPropertyChanged
private void OnPropertyChanged(SessionData Session, String AttributeName)
{
if (Session == null)
return;
sessionDetailPropertyGrid.Refresh();
}
示例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);
}
}
示例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;
}
}
示例5: Simulator
private Simulator()
{
_drivers = new DriverContainerCollection();
_sessionData = new SessionData();
Connection.Instance.SessionInfoUpdated += SdkOnSessionInfoUpdated;
Connection.Instance.TelemetryUpdated += SdkOnTelemetryUpdated;
}
示例6: GetInstance
public static SessionData GetInstance()
{
if (m_instance == null)
{
m_instance = new SessionData();
}
return m_instance;
}
示例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 }
};
示例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 }));
}
示例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;
}
示例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 }));
}
示例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;
}
}
示例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);
}
示例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();
}
示例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;
}
示例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;
}
}