Пример #1
0
        /// <summary>
        /// Create an instance of the hosting class
        /// </summary>
        public SOSHost(IDataReader dataReader, ISOSHostContext context)
        {
            string rid = InstallHelper.GetRid();

            SOSPath  = Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), rid);
            _wrapper = new LLDBServicesWrapper(this, dataReader, context);
        }
Пример #2
0
        /// <summary>
        /// Create an instance of the hosting class
        /// </summary>
        public SOSHost(IDataReader dataReader, ISOSHostContext context)
        {
            string os = null;

            if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
            {
                os = "win";
            }
            else if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux))
            {
                os = "linux";
            }
            if (os == null)
            {
                throw new PlatformNotSupportedException($"Unsupported operating system: {RuntimeInformation.OSDescription}");
            }
            string architecture = RuntimeInformation.OSArchitecture.ToString().ToLowerInvariant();
            string rid          = os + "-" + architecture;

            SOSPath = Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), rid);

            _wrapper = new LLDBServicesWrapper(this, dataReader, context);
        }