2017-07-10 15:47:12 +02:00
|
|
|
|
/*
|
2024-03-05 18:37:42 +01:00
|
|
|
|
* Copyright (c) 2024 ETH Zürich, IT Services
|
2017-07-10 15:47:12 +02:00
|
|
|
|
*
|
|
|
|
|
* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
using System;
|
2019-08-30 09:55:26 +02:00
|
|
|
|
using SafeExamBrowser.Logging.Contracts;
|
2017-07-10 15:47:12 +02:00
|
|
|
|
|
2018-08-31 10:06:27 +02:00
|
|
|
|
namespace SafeExamBrowser.Logging
|
2017-07-10 15:47:12 +02:00
|
|
|
|
{
|
2018-03-06 14:35:10 +01:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// Default implementation of <see cref="IThreadInfo"/>.
|
|
|
|
|
/// </summary>
|
2017-10-10 15:44:04 +02:00
|
|
|
|
public class ThreadInfo : IThreadInfo
|
2017-07-10 15:47:12 +02:00
|
|
|
|
{
|
|
|
|
|
public int Id { get; private set; }
|
|
|
|
|
public string Name { get; private set; }
|
|
|
|
|
|
|
|
|
|
public bool HasName
|
|
|
|
|
{
|
|
|
|
|
get { return !String.IsNullOrWhiteSpace(Name); }
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public ThreadInfo(int id, string name = null)
|
|
|
|
|
{
|
|
|
|
|
Id = id;
|
|
|
|
|
Name = name;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public object Clone()
|
|
|
|
|
{
|
|
|
|
|
return new ThreadInfo(Id, Name);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|