2014-11-09 18:24:57 +00:00
|
|
|
using MediaBrowser.Server.Mono.Native;
|
|
|
|
using MediaBrowser.Server.Startup.Common;
|
2013-09-24 21:06:21 +00:00
|
|
|
using System;
|
2013-09-26 21:20:26 +00:00
|
|
|
using System.Diagnostics;
|
2016-11-13 21:04:21 +00:00
|
|
|
using System.Globalization;
|
2015-05-23 22:01:13 +00:00
|
|
|
using System.IO;
|
|
|
|
using System.Linq;
|
2013-10-14 15:08:33 +00:00
|
|
|
using System.Net;
|
|
|
|
using System.Net.Security;
|
2014-10-06 23:58:46 +00:00
|
|
|
using System.Reflection;
|
2016-11-11 08:13:11 +00:00
|
|
|
using System.Text.RegularExpressions;
|
2013-09-26 21:20:26 +00:00
|
|
|
using System.Threading.Tasks;
|
2017-09-09 18:51:24 +00:00
|
|
|
using Emby.Drawing;
|
2016-11-18 21:06:00 +00:00
|
|
|
using Emby.Server.Implementations;
|
2017-08-16 06:43:41 +00:00
|
|
|
using Emby.Server.Implementations.EnvironmentInfo;
|
2016-11-11 07:24:36 +00:00
|
|
|
using Emby.Server.Implementations.IO;
|
2017-08-16 06:43:41 +00:00
|
|
|
using Emby.Server.Implementations.Networking;
|
2017-09-09 18:51:24 +00:00
|
|
|
using MediaBrowser.Controller;
|
2017-02-20 20:50:58 +00:00
|
|
|
using MediaBrowser.Model.IO;
|
2016-11-11 08:13:11 +00:00
|
|
|
using MediaBrowser.Model.System;
|
|
|
|
using Mono.Unix.Native;
|
2016-11-11 19:55:12 +00:00
|
|
|
using X509Certificate = System.Security.Cryptography.X509Certificates.X509Certificate;
|
2018-09-12 17:26:21 +00:00
|
|
|
using System.Threading;
|
2018-12-12 17:55:14 +00:00
|
|
|
using InteropServices = System.Runtime.InteropServices;
|
2018-12-13 13:18:25 +00:00
|
|
|
using Microsoft.Extensions.Logging;
|
2018-12-14 21:07:28 +00:00
|
|
|
using Microsoft.Extensions.Configuration;
|
2018-12-13 13:18:25 +00:00
|
|
|
using ILogger = Microsoft.Extensions.Logging.ILogger;
|
|
|
|
using Serilog;
|
|
|
|
using Serilog.AspNetCore;
|
2013-09-24 21:06:21 +00:00
|
|
|
|
|
|
|
namespace MediaBrowser.Server.Mono
|
|
|
|
{
|
2015-05-23 22:28:26 +00:00
|
|
|
public class MainClass
|
|
|
|
{
|
|
|
|
private static ILogger _logger;
|
2017-02-20 20:50:58 +00:00
|
|
|
private static IFileSystem FileSystem;
|
2017-09-09 18:51:24 +00:00
|
|
|
private static IServerApplicationPaths _appPaths;
|
2018-12-13 13:18:25 +00:00
|
|
|
private static ILoggerFactory _loggerFactory;
|
2013-09-26 21:20:26 +00:00
|
|
|
|
2017-08-28 18:19:23 +00:00
|
|
|
private static readonly TaskCompletionSource<bool> ApplicationTaskCompletionSource = new TaskCompletionSource<bool>();
|
|
|
|
private static bool _restartOnShutdown;
|
|
|
|
|
2015-05-23 22:28:26 +00:00
|
|
|
public static void Main(string[] args)
|
|
|
|
{
|
2014-11-14 06:27:10 +00:00
|
|
|
var applicationPath = Assembly.GetEntryAssembly().Location;
|
2016-11-21 17:25:42 +00:00
|
|
|
|
|
|
|
SetSqliteProvider();
|
2014-09-14 15:26:33 +00:00
|
|
|
|
2016-11-18 21:06:00 +00:00
|
|
|
var options = new StartupOptions(Environment.GetCommandLineArgs());
|
2015-05-23 22:28:26 +00:00
|
|
|
|
|
|
|
// Allow this to be specified on the command line.
|
|
|
|
var customProgramDataPath = options.GetOption("-programdata");
|
2013-12-04 14:52:38 +00:00
|
|
|
|
2015-05-23 22:28:26 +00:00
|
|
|
var appPaths = CreateApplicationPaths(applicationPath, customProgramDataPath);
|
2017-09-09 18:51:24 +00:00
|
|
|
_appPaths = appPaths;
|
2013-09-26 21:20:26 +00:00
|
|
|
|
2018-12-14 21:07:28 +00:00
|
|
|
createLogger();
|
|
|
|
|
|
|
|
using (var loggerFactory = new SerilogLoggerFactory())
|
2018-12-13 13:18:25 +00:00
|
|
|
{
|
|
|
|
_loggerFactory = loggerFactory;
|
2013-09-26 21:20:26 +00:00
|
|
|
|
2018-12-13 13:18:25 +00:00
|
|
|
_logger = loggerFactory.CreateLogger("Main");
|
2013-09-26 21:20:26 +00:00
|
|
|
|
2018-12-13 13:18:25 +00:00
|
|
|
ApplicationHost.LogEnvironmentInfo(_logger, appPaths, true);
|
2013-09-26 21:20:26 +00:00
|
|
|
|
2017-09-05 19:49:02 +00:00
|
|
|
AppDomain.CurrentDomain.UnhandledException += CurrentDomain_UnhandledException;
|
2017-08-28 18:19:23 +00:00
|
|
|
|
2018-12-13 13:18:25 +00:00
|
|
|
RunApplication(appPaths, loggerFactory, options);
|
2017-09-10 00:24:45 +00:00
|
|
|
|
2018-12-13 13:18:25 +00:00
|
|
|
_logger.LogInformation("Disposing app host");
|
2017-09-05 19:49:02 +00:00
|
|
|
|
2017-09-10 00:24:45 +00:00
|
|
|
if (_restartOnShutdown)
|
|
|
|
{
|
|
|
|
StartNewInstance(options);
|
2017-08-28 18:19:23 +00:00
|
|
|
}
|
2015-05-23 22:28:26 +00:00
|
|
|
}
|
|
|
|
}
|
2013-09-26 21:20:26 +00:00
|
|
|
|
2016-11-21 17:25:42 +00:00
|
|
|
private static void SetSqliteProvider()
|
|
|
|
{
|
2018-09-12 17:26:21 +00:00
|
|
|
// SQLitePCL.raw.SetProvider(new SQLitePCL.SQLite3Provider_sqlite3());
|
|
|
|
//SQLitePCL.raw.SetProvider(new SQLitePCL.SQLite3Provider_sqlite3());
|
|
|
|
SQLitePCL.Batteries_V2.Init();
|
2016-11-21 17:25:42 +00:00
|
|
|
}
|
|
|
|
|
2015-05-23 22:28:26 +00:00
|
|
|
private static ServerApplicationPaths CreateApplicationPaths(string applicationPath, string programDataPath)
|
|
|
|
{
|
|
|
|
if (string.IsNullOrEmpty(programDataPath))
|
|
|
|
{
|
2018-12-12 17:55:14 +00:00
|
|
|
if (InteropServices.RuntimeInformation.IsOSPlatform(InteropServices.OSPlatform.Windows))
|
|
|
|
{
|
2018-12-13 10:30:39 +00:00
|
|
|
programDataPath = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData);
|
2018-12-12 17:55:14 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2018-12-13 10:30:39 +00:00
|
|
|
// $XDG_DATA_HOME defines the base directory relative to which user specific data files should be stored.
|
|
|
|
programDataPath = Environment.GetEnvironmentVariable("XDG_DATA_HOME");
|
|
|
|
// If $XDG_DATA_HOME is either not set or empty, $HOME/.local/share should be used.
|
|
|
|
if (string.IsNullOrEmpty(programDataPath)){
|
|
|
|
programDataPath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.UserProfile), ".local", "share");
|
|
|
|
}
|
2018-12-12 17:55:14 +00:00
|
|
|
}
|
2018-12-14 21:57:26 +00:00
|
|
|
programDataPath = Path.Combine(programDataPath, "jellyfin");
|
2015-05-23 22:28:26 +00:00
|
|
|
}
|
2013-09-26 21:20:26 +00:00
|
|
|
|
2016-11-13 21:04:21 +00:00
|
|
|
var appFolderPath = Path.GetDirectoryName(applicationPath);
|
|
|
|
|
2018-12-12 17:55:14 +00:00
|
|
|
return new ServerApplicationPaths(programDataPath, appFolderPath, appFolderPath);
|
2015-05-23 22:28:26 +00:00
|
|
|
}
|
2013-09-26 21:20:26 +00:00
|
|
|
|
2018-12-13 13:18:25 +00:00
|
|
|
private static void RunApplication(ServerApplicationPaths appPaths, ILoggerFactory loggerFactory, StartupOptions options)
|
2015-05-23 22:28:26 +00:00
|
|
|
{
|
|
|
|
// Allow all https requests
|
2017-08-03 16:26:01 +00:00
|
|
|
ServicePointManager.ServerCertificateValidationCallback = new RemoteCertificateValidationCallback(delegate { return true; });
|
2013-10-14 15:08:33 +00:00
|
|
|
|
2017-03-10 19:51:29 +00:00
|
|
|
var environmentInfo = GetEnvironmentInfo();
|
2014-10-06 23:58:46 +00:00
|
|
|
|
2018-12-13 13:18:25 +00:00
|
|
|
var fileSystem = new ManagedFileSystem(loggerFactory.CreateLogger("FileSystem"), environmentInfo, null, appPaths.TempDirectory, true);
|
2017-02-20 20:50:58 +00:00
|
|
|
|
2017-03-10 19:51:29 +00:00
|
|
|
FileSystem = fileSystem;
|
2014-11-09 18:24:57 +00:00
|
|
|
|
2017-09-09 18:51:24 +00:00
|
|
|
using (var appHost = new MonoAppHost(appPaths,
|
2018-12-13 13:18:25 +00:00
|
|
|
loggerFactory,
|
2016-11-11 19:55:12 +00:00
|
|
|
options,
|
|
|
|
fileSystem,
|
|
|
|
new PowerManagement(),
|
2018-09-12 17:26:21 +00:00
|
|
|
"embyserver-mono_{version}.zip",
|
2016-11-11 19:55:12 +00:00
|
|
|
environmentInfo,
|
2017-09-09 18:51:24 +00:00
|
|
|
new NullImageEncoder(),
|
2018-12-13 13:18:25 +00:00
|
|
|
new SystemEvents(loggerFactory.CreateLogger("SystemEvents")),
|
|
|
|
new NetworkManager(loggerFactory.CreateLogger("NetworkManager"), environmentInfo)))
|
2015-05-23 22:28:26 +00:00
|
|
|
{
|
2017-09-09 18:51:24 +00:00
|
|
|
if (options.ContainsOption("-v"))
|
|
|
|
{
|
|
|
|
Console.WriteLine(appHost.ApplicationVersion.ToString());
|
|
|
|
return;
|
|
|
|
}
|
2015-05-23 22:28:26 +00:00
|
|
|
|
2017-09-09 18:51:24 +00:00
|
|
|
Console.WriteLine("appHost.Init");
|
2015-05-23 22:28:26 +00:00
|
|
|
|
2018-09-12 17:26:21 +00:00
|
|
|
appHost.Init();
|
2015-05-23 22:28:26 +00:00
|
|
|
|
2018-12-13 13:18:25 +00:00
|
|
|
appHost.ImageProcessor.ImageEncoder = ImageEncoderHelper.GetImageEncoder(_logger, fileSystem, options, () => appHost.HttpClient, appPaths, environmentInfo, appHost.LocalizationManager);
|
2017-09-11 18:49:20 +00:00
|
|
|
|
2017-09-09 18:51:24 +00:00
|
|
|
Console.WriteLine("Running startup tasks");
|
2015-05-23 22:28:26 +00:00
|
|
|
|
2018-09-12 17:26:21 +00:00
|
|
|
var task = appHost.RunStartupTasks();
|
2017-09-09 18:51:24 +00:00
|
|
|
Task.WaitAll(task);
|
2015-05-23 22:28:26 +00:00
|
|
|
|
2017-09-09 18:51:24 +00:00
|
|
|
task = ApplicationTaskCompletionSource.Task;
|
|
|
|
|
|
|
|
Task.WaitAll(task);
|
|
|
|
}
|
2015-05-23 22:28:26 +00:00
|
|
|
}
|
|
|
|
|
2018-12-14 21:07:28 +00:00
|
|
|
private static async Task createLogger()
|
|
|
|
{
|
|
|
|
try
|
|
|
|
{
|
|
|
|
string path = Path.Combine(_appPaths.ProgramDataPath, "logging.json");
|
|
|
|
|
|
|
|
if (!File.Exists(path))
|
|
|
|
{
|
|
|
|
var assembly = typeof(MainClass).Assembly;
|
|
|
|
// For some reason the csproj name is used instead of the assembly name
|
|
|
|
var resourcePath = "EmbyServer.Resources.Configuration.logging.json";
|
|
|
|
using (Stream rscstr = assembly.GetManifestResourceStream(resourcePath))
|
|
|
|
using (Stream fstr = File.Open(path, FileMode.CreateNew))
|
|
|
|
{
|
|
|
|
await rscstr.CopyToAsync(fstr);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
var configuration = new ConfigurationBuilder()
|
|
|
|
.AddJsonFile(path)
|
|
|
|
.Build();
|
|
|
|
|
|
|
|
Serilog.Log.Logger = new LoggerConfiguration()
|
|
|
|
.ReadFrom.Configuration(configuration)
|
|
|
|
.Enrich.FromLogContext()
|
|
|
|
.CreateLogger();
|
|
|
|
}
|
|
|
|
catch (Exception ex)
|
|
|
|
{
|
|
|
|
Serilog.Log.Logger = new LoggerConfiguration()
|
|
|
|
.WriteTo.Console(outputTemplate: "[{Timestamp:HH:mm:ss}] [{Level:u3}] {Message:lj}{NewLine}{Exception}")
|
|
|
|
.WriteTo.File(
|
|
|
|
Path.Combine(AppContext.BaseDirectory, "logs", "log_.log"),
|
|
|
|
rollingInterval: RollingInterval.Day,
|
|
|
|
outputTemplate: "[{Timestamp:yyyy-MM-dd HH:mm:ss.fff zzz}] [{Level:u3}] {Message}{NewLine}{Exception}")
|
|
|
|
.Enrich.FromLogContext()
|
|
|
|
.CreateLogger();
|
|
|
|
|
|
|
|
Serilog.Log.Logger.Fatal(ex, "Failed to read logger config");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2016-11-11 08:13:11 +00:00
|
|
|
private static MonoEnvironmentInfo GetEnvironmentInfo()
|
|
|
|
{
|
|
|
|
var info = new MonoEnvironmentInfo();
|
|
|
|
|
|
|
|
var uname = GetUnixName();
|
|
|
|
|
|
|
|
var sysName = uname.sysname ?? string.Empty;
|
|
|
|
|
|
|
|
if (string.Equals(sysName, "Darwin", StringComparison.OrdinalIgnoreCase))
|
|
|
|
{
|
2017-08-17 20:19:02 +00:00
|
|
|
info.OperatingSystem = Model.System.OperatingSystem.OSX;
|
2016-11-11 08:13:11 +00:00
|
|
|
}
|
|
|
|
else if (string.Equals(sysName, "Linux", StringComparison.OrdinalIgnoreCase))
|
|
|
|
{
|
2017-08-17 20:19:02 +00:00
|
|
|
info.OperatingSystem = Model.System.OperatingSystem.Linux;
|
2016-11-11 08:13:11 +00:00
|
|
|
}
|
|
|
|
else if (string.Equals(sysName, "BSD", StringComparison.OrdinalIgnoreCase))
|
|
|
|
{
|
2017-08-17 20:19:02 +00:00
|
|
|
info.OperatingSystem = Model.System.OperatingSystem.BSD;
|
2016-11-11 08:13:11 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
var archX86 = new Regex("(i|I)[3-6]86");
|
|
|
|
|
|
|
|
if (archX86.IsMatch(uname.machine))
|
|
|
|
{
|
2017-08-17 20:19:02 +00:00
|
|
|
info.SystemArchitecture = Architecture.X86;
|
2016-11-11 08:13:11 +00:00
|
|
|
}
|
|
|
|
else if (string.Equals(uname.machine, "x86_64", StringComparison.OrdinalIgnoreCase))
|
|
|
|
{
|
2017-08-17 20:19:02 +00:00
|
|
|
info.SystemArchitecture = Architecture.X64;
|
2016-11-11 08:13:11 +00:00
|
|
|
}
|
|
|
|
else if (uname.machine.StartsWith("arm", StringComparison.OrdinalIgnoreCase))
|
|
|
|
{
|
2017-08-17 20:19:02 +00:00
|
|
|
info.SystemArchitecture = Architecture.Arm;
|
2016-11-11 08:13:11 +00:00
|
|
|
}
|
|
|
|
else if (System.Environment.Is64BitOperatingSystem)
|
|
|
|
{
|
2017-08-17 20:19:02 +00:00
|
|
|
info.SystemArchitecture = Architecture.X64;
|
2016-11-11 08:13:11 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2017-08-17 20:19:02 +00:00
|
|
|
info.SystemArchitecture = Architecture.X86;
|
2016-11-11 08:13:11 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
return info;
|
|
|
|
}
|
|
|
|
|
|
|
|
private static Uname _unixName;
|
|
|
|
|
|
|
|
private static Uname GetUnixName()
|
|
|
|
{
|
|
|
|
if (_unixName == null)
|
|
|
|
{
|
|
|
|
var uname = new Uname();
|
|
|
|
try
|
|
|
|
{
|
|
|
|
Utsname utsname;
|
|
|
|
var callResult = Syscall.uname(out utsname);
|
|
|
|
if (callResult == 0)
|
|
|
|
{
|
|
|
|
uname.sysname = utsname.sysname ?? string.Empty;
|
|
|
|
uname.machine = utsname.machine ?? string.Empty;
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
catch (Exception ex)
|
|
|
|
{
|
2018-12-13 13:18:25 +00:00
|
|
|
_logger.LogError("Error getting unix name", ex);
|
2016-11-11 08:13:11 +00:00
|
|
|
}
|
|
|
|
_unixName = uname;
|
|
|
|
}
|
|
|
|
return _unixName;
|
|
|
|
}
|
|
|
|
|
|
|
|
public class Uname
|
|
|
|
{
|
|
|
|
public string sysname = string.Empty;
|
|
|
|
public string machine = string.Empty;
|
|
|
|
}
|
|
|
|
|
2015-05-23 22:28:26 +00:00
|
|
|
/// <summary>
|
|
|
|
/// Handles the UnhandledException event of the CurrentDomain control.
|
|
|
|
/// </summary>
|
|
|
|
/// <param name="sender">The source of the event.</param>
|
|
|
|
/// <param name="e">The <see cref="UnhandledExceptionEventArgs"/> instance containing the event data.</param>
|
|
|
|
static void CurrentDomain_UnhandledException(object sender, UnhandledExceptionEventArgs e)
|
|
|
|
{
|
|
|
|
var exception = (Exception)e.ExceptionObject;
|
2013-09-26 21:20:26 +00:00
|
|
|
|
2018-12-13 13:18:25 +00:00
|
|
|
// TODO
|
|
|
|
/*
|
2017-09-09 18:51:24 +00:00
|
|
|
new UnhandledExceptionWriter(_appPaths, _logger, _logManager, FileSystem, new ConsoleLogger()).Log(exception);
|
2013-09-26 21:20:26 +00:00
|
|
|
|
2015-05-23 22:28:26 +00:00
|
|
|
if (!Debugger.IsAttached)
|
|
|
|
{
|
2017-04-27 18:11:56 +00:00
|
|
|
var message = LogHelper.GetLogMessage(exception).ToString();
|
|
|
|
|
2017-05-28 15:56:12 +00:00
|
|
|
if (message.IndexOf("InotifyWatcher", StringComparison.OrdinalIgnoreCase) == -1 &&
|
|
|
|
message.IndexOf("_IOCompletionCallback", StringComparison.OrdinalIgnoreCase) == -1)
|
2017-04-27 18:11:56 +00:00
|
|
|
{
|
|
|
|
Environment.Exit(System.Runtime.InteropServices.Marshal.GetHRForException(exception));
|
|
|
|
}
|
2018-12-13 13:18:25 +00:00
|
|
|
}*/
|
2015-05-23 22:28:26 +00:00
|
|
|
}
|
2013-09-26 21:20:26 +00:00
|
|
|
|
2015-05-23 22:28:26 +00:00
|
|
|
public static void Shutdown()
|
|
|
|
{
|
|
|
|
ApplicationTaskCompletionSource.SetResult(true);
|
|
|
|
}
|
2015-05-23 22:01:13 +00:00
|
|
|
|
2017-08-28 18:19:23 +00:00
|
|
|
public static void Restart()
|
2015-05-23 22:01:13 +00:00
|
|
|
{
|
2017-08-28 18:19:23 +00:00
|
|
|
_restartOnShutdown = true;
|
|
|
|
|
|
|
|
Shutdown();
|
|
|
|
}
|
2015-05-23 22:01:13 +00:00
|
|
|
|
2017-08-28 18:19:23 +00:00
|
|
|
private static void StartNewInstance(StartupOptions startupOptions)
|
|
|
|
{
|
2018-12-13 13:18:25 +00:00
|
|
|
_logger.LogInformation("Starting new instance");
|
2015-05-23 22:01:13 +00:00
|
|
|
|
2015-06-05 14:27:01 +00:00
|
|
|
string module = startupOptions.GetOption("-restartpath");
|
|
|
|
string commandLineArgsString = startupOptions.GetOption("-restartargs") ?? string.Empty;
|
2015-05-23 22:01:13 +00:00
|
|
|
|
2015-06-05 14:27:01 +00:00
|
|
|
if (string.IsNullOrWhiteSpace(module))
|
|
|
|
{
|
|
|
|
module = Environment.GetCommandLineArgs().First();
|
|
|
|
}
|
|
|
|
if (!startupOptions.ContainsOption("-restartargs"))
|
|
|
|
{
|
|
|
|
var args = Environment.GetCommandLineArgs()
|
2017-08-28 18:19:23 +00:00
|
|
|
.Skip(1)
|
|
|
|
.Select(NormalizeCommandLineArgument)
|
|
|
|
.ToArray();
|
2015-06-05 14:27:01 +00:00
|
|
|
|
2017-08-24 19:52:19 +00:00
|
|
|
commandLineArgsString = string.Join(" ", args);
|
2015-06-05 14:27:01 +00:00
|
|
|
}
|
2015-05-23 22:28:26 +00:00
|
|
|
|
2018-12-13 13:18:25 +00:00
|
|
|
_logger.LogInformation("Executable: {0}", module);
|
|
|
|
_logger.LogInformation("Arguments: {0}", commandLineArgsString);
|
2015-05-23 22:01:13 +00:00
|
|
|
|
2015-05-23 22:28:26 +00:00
|
|
|
Process.Start(module, commandLineArgsString);
|
2015-05-23 22:01:13 +00:00
|
|
|
}
|
|
|
|
|
2015-05-23 22:28:26 +00:00
|
|
|
private static string NormalizeCommandLineArgument(string arg)
|
|
|
|
{
|
|
|
|
if (arg.IndexOf(" ", StringComparison.OrdinalIgnoreCase) == -1)
|
|
|
|
{
|
2015-05-23 22:01:13 +00:00
|
|
|
return arg;
|
2015-05-23 22:28:26 +00:00
|
|
|
}
|
2015-05-23 22:01:13 +00:00
|
|
|
|
|
|
|
return "\"" + arg + "\"";
|
2015-05-23 22:28:26 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2018-09-12 17:26:21 +00:00
|
|
|
// class NoCheckCertificatePolicy : ICertificatePolicy
|
|
|
|
// {
|
|
|
|
// public bool CheckValidationResult(ServicePoint srvPoint, X509Certificate certificate, WebRequest request, int certificateProblem)
|
|
|
|
// {
|
|
|
|
// return true;
|
|
|
|
// }
|
|
|
|
// }
|
|
|
|
|
2016-11-11 08:13:11 +00:00
|
|
|
public class MonoEnvironmentInfo : EnvironmentInfo
|
|
|
|
{
|
2018-09-12 17:26:21 +00:00
|
|
|
|
|
|
|
//public override string GetUserId()
|
|
|
|
//{
|
|
|
|
// return Syscall.getuid().ToString(CultureInfo.InvariantCulture);
|
|
|
|
//}
|
2016-11-11 08:13:11 +00:00
|
|
|
}
|
2013-09-24 21:06:21 +00:00
|
|
|
}
|