File size: 27,044 Bytes
8c763fb | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 | // Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
using System;
using System.Collections.Generic;
using System.Globalization;
using Microsoft.Win32;
#pragma warning disable 1591, 1572, 1571, 1573, 1587, 1570, 0067
#region PS_STUBS
// Include PS types that are not needed for PowerShell on CSS
namespace System.Management.Automation
{
#region PSTransaction
/// <summary>
/// We don't need PSTransaction related types on CSS because System.Transactions
/// namespace is not available in CoreCLR.
/// </summary>
public sealed class PSTransactionContext : IDisposable
{
internal PSTransactionContext(Internal.PSTransactionManager transactionManager) { }
public void Dispose() { }
}
/// <summary>
/// The severity of error that causes PowerShell to automatically
/// rollback the transaction.
/// </summary>
public enum RollbackSeverity
{
/// <summary>
/// Non-terminating errors or worse.
/// </summary>
Error,
/// <summary>
/// Terminating errors or worse.
/// </summary>
TerminatingError,
/// <summary>
/// Do not rollback the transaction on error.
/// </summary>
Never
}
#endregion PSTransaction
}
namespace System.Management.Automation.Internal
{
/// <summary>
/// We don't need PSTransaction related types on CSS because System.Transactions
/// namespace is not available in CoreCLR.
/// </summary>
internal sealed class PSTransactionManager : IDisposable
{
/// <summary>
/// Determines if you have a transaction that you can set active and work on.
/// </summary>
/// <remarks>
/// Always return false in CoreCLR
/// </remarks>
internal bool HasTransaction
{
get
{
return false;
}
}
/// <summary>
/// Determines if the last transaction has been committed.
/// </summary>
internal bool IsLastTransactionCommitted
{
get
{
throw new NotImplementedException("IsLastTransactionCommitted");
}
}
/// <summary>
/// Determines if the last transaction has been rolled back.
/// </summary>
internal bool IsLastTransactionRolledBack
{
get
{
throw new NotImplementedException("IsLastTransactionRolledBack");
}
}
/// <summary>
/// Gets the rollback preference for the active transaction.
/// </summary>
internal RollbackSeverity RollbackPreference
{
get
{
throw new NotImplementedException("RollbackPreference");
}
}
/// <summary>
/// Called by engine APIs to ensure they are protected from
/// ambient transactions.
/// </summary>
/// <remarks>
/// Always return null in CoreCLR
/// </remarks>
internal static IDisposable GetEngineProtectionScope()
{
return null;
}
/// <summary>
/// Aborts the current transaction, no matter how many subscribers are part of it.
/// </summary>
internal void Rollback(bool suppressErrors)
{
throw new NotImplementedException("Rollback");
}
public void Dispose() { }
}
}
namespace Microsoft.PowerShell.Commands.Internal
{
using System.Security.AccessControl;
using System.Security.Principal;
#region TransactedRegistryKey
internal abstract class TransactedRegistryKey : IDisposable
{
public void Dispose() { }
public void SetValue(string name, object value)
{
throw new NotImplementedException("SetValue(string name, obj value) is not implemented. TransactedRegistry related APIs should not be used.");
}
public void SetValue(string name, object value, RegistryValueKind valueKind)
{
throw new NotImplementedException("SetValue(string name, obj value, RegistryValueKind valueKind) is not implemented. TransactedRegistry related APIs should not be used.");
}
public string[] GetValueNames()
{
throw new NotImplementedException("GetValueNames() is not implemented. TransactedRegistry related APIs should not be used.");
}
public void DeleteValue(string name)
{
throw new NotImplementedException("DeleteValue(string name) is not implemented. TransactedRegistry related APIs should not be used.");
}
public string[] GetSubKeyNames()
{
throw new NotImplementedException("GetSubKeyNames() is not implemented. TransactedRegistry related APIs should not be used.");
}
public TransactedRegistryKey CreateSubKey(string subkey)
{
throw new NotImplementedException("CreateSubKey(string subkey) is not implemented. TransactedRegistry related APIs should not be used.");
}
public TransactedRegistryKey OpenSubKey(string name, bool writable)
{
throw new NotImplementedException("OpenSubKey(string name, bool writeable) is not implemented. TransactedRegistry related APIs should not be used.");
}
public void DeleteSubKeyTree(string subkey)
{
throw new NotImplementedException("DeleteSubKeyTree(string subkey) is not implemented. TransactedRegistry related APIs should not be used.");
}
public object GetValue(string name)
{
throw new NotImplementedException("GetValue(string name) is not implemented. TransactedRegistry related APIs should not be used.");
}
public object GetValue(string name, object defaultValue, RegistryValueOptions options)
{
throw new NotImplementedException("GetValue(string name, object defaultValue, RegistryValueOptions options) is not implemented. TransactedRegistry related APIs should not be used.");
}
public RegistryValueKind GetValueKind(string name)
{
throw new NotImplementedException("GetValueKind(string name) is not implemented. TransactedRegistry related APIs should not be used.");
}
public void Close()
{
throw new NotImplementedException("Close() is not implemented. TransactedRegistry related APIs should not be used.");
}
public abstract string Name { get; }
public abstract int SubKeyCount { get; }
public void SetAccessControl(ObjectSecurity securityDescriptor)
{
throw new NotImplementedException("SetAccessControl(ObjectSecurity securityDescriptor) is not implemented. TransactedRegistry related APIs should not be used.");
}
public ObjectSecurity GetAccessControl(AccessControlSections includeSections)
{
throw new NotImplementedException("GetAccessControl(AccessControlSections includeSections) is not implemented. TransactedRegistry related APIs should not be used.");
}
}
internal sealed class TransactedRegistry
{
internal static readonly TransactedRegistryKey LocalMachine;
internal static readonly TransactedRegistryKey ClassesRoot;
internal static readonly TransactedRegistryKey Users;
internal static readonly TransactedRegistryKey CurrentConfig;
internal static readonly TransactedRegistryKey CurrentUser;
}
internal sealed class TransactedRegistrySecurity : ObjectSecurity
{
public override Type AccessRightType
{
get
{
throw new NotImplementedException();
}
}
public override Type AccessRuleType
{
get
{
throw new NotImplementedException();
}
}
public override Type AuditRuleType
{
get
{
throw new NotImplementedException();
}
}
public override AccessRule AccessRuleFactory(IdentityReference identityReference, int accessMask, bool isInherited, InheritanceFlags inheritanceFlags, PropagationFlags propagationFlags, AccessControlType type)
{
throw new NotImplementedException();
}
public override AuditRule AuditRuleFactory(IdentityReference identityReference, int accessMask, bool isInherited, InheritanceFlags inheritanceFlags, PropagationFlags propagationFlags, AuditFlags flags)
{
throw new NotImplementedException();
}
protected override bool ModifyAccess(AccessControlModification modification, AccessRule rule, out bool modified)
{
throw new NotImplementedException();
}
protected override bool ModifyAudit(AccessControlModification modification, AuditRule rule, out bool modified)
{
throw new NotImplementedException();
}
}
#endregion TransactedRegistryKey
}
#endregion PS_STUBS
// -- Will port the actual PS component [update: Not necessarily porting all PS components listed here]
#region TEMPORARY
namespace System.Management.Automation.Internal
{
using Microsoft.PowerShell.Commands;
/// <summary>
/// TODO:CORECLR - The actual PowerShellModuleAssemblyAnalyzer cannot be enabled because we don't have 'System.Reflection.Metadata.dll' in our branch yet.
/// This stub will be removed once we enable the actual 'PowerShellModuleAssemblyAnalyzer'.
/// </summary>
internal static class PowerShellModuleAssemblyAnalyzer
{
internal static BinaryAnalysisResult AnalyzeModuleAssembly(string path, out Version assemblyVersion)
{
assemblyVersion = new Version("0.0.0.0");
return null;
}
}
}
namespace System.Management.Automation
{
using Microsoft.Win32;
#region RegistryStringResourceIndirect
internal sealed class RegistryStringResourceIndirect : IDisposable
{
internal static RegistryStringResourceIndirect GetResourceIndirectReader()
{
return new RegistryStringResourceIndirect();
}
/// <summary>
/// Dispose method unloads the app domain that was
/// created in the constructor.
/// </summary>
public void Dispose()
{
}
internal string GetResourceStringIndirect(
string assemblyName,
string modulePath,
string baseNameRIDPair)
{
throw new NotImplementedException("RegistryStringResourceIndirect.GetResourceStringIndirect - 3 params");
}
internal string GetResourceStringIndirect(
RegistryKey key,
string valueName,
string assemblyName,
string modulePath)
{
throw new NotImplementedException("RegistryStringResourceIndirect.GetResourceStringIndirect - 4 params");
}
}
#endregion
}
#if UNIX
namespace System.Management.Automation.ComInterop
{
using System.Dynamic;
using System.Runtime.InteropServices;
/// <summary>
/// Provides helper methods to bind COM objects dynamically.
/// </summary>
/// <remarks>
/// COM is not supported on Unix platforms. So this is a stub type.
/// </remarks>
internal static class ComBinder
{
/// <summary>
/// Tries to perform binding of the dynamic get index operation.
/// </summary>
/// <remarks>
/// Always return false in CoreCLR.
/// </remarks>
public static bool TryBindGetIndex(GetIndexBinder binder, DynamicMetaObject instance, DynamicMetaObject[] args, out DynamicMetaObject result)
{
result = null;
return false;
}
/// <summary>
/// Tries to perform binding of the dynamic set index operation.
/// </summary>
/// <remarks>
/// Always return false in CoreCLR.
/// </remarks>
public static bool TryBindSetIndex(SetIndexBinder binder, DynamicMetaObject instance, DynamicMetaObject[] args, DynamicMetaObject value, out DynamicMetaObject result)
{
result = null;
return false;
}
/// <summary>
/// Tries to perform binding of the dynamic get member operation.
/// </summary>
/// <remarks>
/// Always return false in CoreCLR.
/// </remarks>
public static bool TryBindGetMember(GetMemberBinder binder, DynamicMetaObject instance, out DynamicMetaObject result, bool delayInvocation)
{
result = null;
return false;
}
/// <summary>
/// Tries to perform binding of the dynamic set member operation.
/// </summary>
/// <remarks>
/// Always return false in CoreCLR.
/// </remarks>
public static bool TryBindSetMember(SetMemberBinder binder, DynamicMetaObject instance, DynamicMetaObject value, out DynamicMetaObject result)
{
result = null;
return false;
}
/// <summary>
/// Tries to perform binding of the dynamic invoke member operation.
/// </summary>
/// <remarks>
/// Always return false in CoreCLR.
/// </remarks>
public static bool TryBindInvokeMember(InvokeMemberBinder binder, bool isSetProperty, DynamicMetaObject instance, DynamicMetaObject[] args, out DynamicMetaObject result)
{
result = null;
return false;
}
}
internal static class VarEnumSelector
{
internal static Type GetTypeForVarEnum(VarEnum vt)
{
throw new PlatformNotSupportedException();
}
}
}
namespace System.Management.Automation.Security
{
/// <summary>
/// Application white listing security policies only affect Windows OSs.
/// </summary>
public sealed class SystemPolicy
{
private SystemPolicy() { }
/// <summary>
/// Writes to PowerShell WDAC Audit mode ETW log.
/// </summary>
/// <param name="context">Current execution context.</param>
/// <param name="title">Audit message title.</param>
/// <param name="message">Audit message message.</param>
/// <param name="fqid">Fully Qualified ID.</param>
/// <param name="dropIntoDebugger">Stops code execution and goes into debugger mode.</param>
internal static void LogWDACAuditMessage(
ExecutionContext context,
string title,
string message,
string fqid,
bool dropIntoDebugger = false)
{
}
/// <summary>
/// Gets the system lockdown policy.
/// </summary>
/// <remarks>Always return SystemEnforcementMode.None on non-Windows platforms.</remarks>
public static SystemEnforcementMode GetSystemLockdownPolicy()
{
return SystemEnforcementMode.None;
}
/// <summary>
/// Gets lockdown policy as applied to a file.
/// </summary>
/// <remarks>Always return SystemEnforcementMode.None on non-Windows platforms.</remarks>
public static SystemEnforcementMode GetLockdownPolicy(string path, System.Runtime.InteropServices.SafeHandle handle)
{
return SystemEnforcementMode.None;
}
internal static bool IsClassInApprovedList(Guid clsid)
{
throw new NotImplementedException("SystemPolicy.IsClassInApprovedList not implemented");
}
/// <summary>
/// Gets the system wide script file policy enforcement for an open file.
/// Based on system WDAC (Windows Defender Application Control) or AppLocker policies.
/// </summary>
/// <param name="filePath">Script file path for policy check.</param>
/// <param name="fileStream">FileStream object to script file path.</param>
/// <returns>Policy check result for script file.</returns>
public static SystemScriptFileEnforcement GetFilePolicyEnforcement(
string filePath,
System.IO.FileStream fileStream)
{
return SystemScriptFileEnforcement.None;
}
}
/// <summary>
/// How the policy is being enforced.
/// </summary>
public enum SystemEnforcementMode
{
/// Not enforced at all
None = 0,
/// Enabled - allow, but audit
Audit = 1,
/// Enabled, enforce restrictions
Enforce = 2
}
/// <summary>
/// System wide policy enforcement for a specific script file.
/// </summary>
public enum SystemScriptFileEnforcement
{
/// <summary>
/// No policy enforcement.
/// </summary>
None = 0,
/// <summary>
/// Script file is blocked from running.
/// </summary>
Block = 1,
/// <summary>
/// Script file is allowed to run without restrictions (FullLanguage mode).
/// </summary>
Allow = 2,
/// <summary>
/// Script file is allowed to run in ConstrainedLanguage mode only.
/// </summary>
AllowConstrained = 3,
/// <summary>
/// Script file is allowed to run in FullLanguage mode but will emit ConstrainedLanguage restriction audit logs.
/// </summary>
AllowConstrainedAudit = 4
}
}
// Porting note: Tracing is absolutely not available on Linux
namespace System.Management.Automation.Tracing
{
using System.Diagnostics.CodeAnalysis;
using System.Management.Automation.Internal;
/// <summary>
/// </summary>
[SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly")]
public abstract class EtwActivity
{
/// <summary>
/// </summary>
/// <param name="activityId"></param>
/// <returns></returns>
public static bool SetActivityId(Guid activityId)
{
return false;
}
/// <summary>
/// </summary>
/// <returns></returns>
public static Guid CreateActivityId()
{
return Guid.Empty;
}
/// <summary>
/// </summary>
/// <returns></returns>
public static Guid GetActivityId()
{
return Guid.Empty;
}
}
public enum PowerShellTraceTask
{
/// <summary>
/// None.
/// </summary>
None = 0,
/// <summary>
/// CreateRunspace.
/// </summary>
CreateRunspace = 1,
/// <summary>
/// ExecuteCommand.
/// </summary>
ExecuteCommand = 2,
/// <summary>
/// Serialization.
/// </summary>
Serialization = 3,
/// <summary>
/// PowerShellConsoleStartup.
/// </summary>
PowerShellConsoleStartup = 4,
}
/// <summary>
/// Defines Keywords.
/// </summary>
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1028")]
[Flags]
public enum PowerShellTraceKeywords : ulong
{
/// <summary>
/// None.
/// </summary>
None = 0,
/// <summary>
/// Runspace.
/// </summary>
Runspace = 0x1,
/// <summary>
/// Pipeline.
/// </summary>
Pipeline = 0x2,
/// <summary>
/// Protocol.
/// </summary>
Protocol = 0x4,
/// <summary>
/// Transport.
/// </summary>
Transport = 0x8,
/// <summary>
/// Host.
/// </summary>
Host = 0x10,
/// <summary>
/// Cmdlets.
/// </summary>
Cmdlets = 0x20,
/// <summary>
/// Serializer.
/// </summary>
Serializer = 0x40,
/// <summary>
/// Session.
/// </summary>
Session = 0x80,
/// <summary>
/// ManagedPlugIn.
/// </summary>
ManagedPlugIn = 0x100,
/// <summary>
/// </summary>
UseAlwaysDebug = 0x2000000000000000,
/// <summary>
/// </summary>
UseAlwaysOperational = 0x8000000000000000,
/// <summary>
/// </summary>
UseAlwaysAnalytic = 0x4000000000000000,
}
public sealed partial class Tracer : System.Management.Automation.Tracing.EtwActivity
{
static Tracer() { }
public void EndpointRegistered(string endpointName, string endpointType, string registeredBy)
{
}
public void EndpointUnregistered(string endpointName, string unregisteredBy)
{
}
public void EndpointDisabled(string endpointName, string disabledBy)
{
}
public void EndpointEnabled(string endpointName, string enabledBy)
{
}
public void EndpointModified(string endpointName, string modifiedBy)
{
}
public void BeginContainerParentJobExecution(Guid containerParentJobInstanceId)
{
}
public void BeginProxyJobExecution(Guid proxyJobInstanceId)
{
}
public void ProxyJobRemoteJobAssociation(Guid proxyJobInstanceId, Guid containerParentJobInstanceId)
{
}
public void EndProxyJobExecution(Guid proxyJobInstanceId)
{
}
public void BeginProxyJobEventHandler(Guid proxyJobInstanceId)
{
}
public void EndProxyJobEventHandler(Guid proxyJobInstanceId)
{
}
public void BeginProxyChildJobEventHandler(Guid proxyChildJobInstanceId)
{
}
public void EndContainerParentJobExecution(Guid containerParentJobInstanceId)
{
}
}
public sealed class PowerShellTraceSource : IDisposable
{
internal PowerShellTraceSource(PowerShellTraceTask task, PowerShellTraceKeywords keywords)
{
}
public void Dispose()
{
}
public bool WriteMessage(string message)
{
return false;
}
/// <summary>
/// </summary>
/// <param name="message1"></param>
/// <param name="message2"></param>
/// <returns></returns>
public bool WriteMessage(string message1, string message2)
{
return false;
}
/// <summary>
/// </summary>
/// <param name="message"></param>
/// <param name="instanceId"></param>
/// <returns></returns>
public bool WriteMessage(string message, Guid instanceId)
{
return false;
}
/// <summary>
/// </summary>
/// <param name="className"></param>
/// <param name="methodName"></param>
/// <param name="workflowId"></param>
/// <param name="message"></param>
/// <param name="parameters"></param>
/// <returns></returns>
public void WriteMessage(string className, string methodName, Guid workflowId, string message, params string[] parameters)
{
return;
}
/// <summary>
/// </summary>
/// <param name="className"></param>
/// <param name="methodName"></param>
/// <param name="workflowId"></param>
/// <param name="job"></param>
/// <param name="message"></param>
/// <param name="parameters"></param>
/// <returns></returns>
public void WriteMessage(string className, string methodName, Guid workflowId, Job job, string message, params string[] parameters)
{
return;
}
public bool TraceException(Exception exception)
{
return false;
}
}
/// <summary>
/// TraceSourceFactory will return an instance of TraceSource every time GetTraceSource method is called.
/// </summary>
public static class PowerShellTraceSourceFactory
{
/// <summary>
/// Returns an instance of BaseChannelWriter.
/// If the Etw is not supported by the platform it will return NullWriter.Instance
///
/// A Task and a set of Keywords can be specified in the GetTraceSource method (See overloads).
/// The supplied task and keywords are used to pass to the Etw provider in case they are
/// not defined in the manifest file.
/// </summary>
public static PowerShellTraceSource GetTraceSource()
{
return new PowerShellTraceSource(PowerShellTraceTask.None, PowerShellTraceKeywords.None);
}
/// <summary>
/// Returns an instance of BaseChannelWriter.
/// If the Etw is not supported by the platform it will return NullWriter.Instance
///
/// A Task and a set of Keywords can be specified in the GetTraceSource method (See overloads).
/// The supplied task and keywords are used to pass to the Etw provider in case they are
/// not defined in the manifest file.
/// </summary>
public static PowerShellTraceSource GetTraceSource(PowerShellTraceTask task)
{
return new PowerShellTraceSource(task, PowerShellTraceKeywords.None);
}
/// <summary>
/// Returns an instance of BaseChannelWriter.
/// If the Etw is not supported by the platform it will return NullWriter.Instance
///
/// A Task and a set of Keywords can be specified in the GetTraceSource method (See overloads).
/// The supplied task and keywords are used to pass to the Etw provider in case they are
/// not defined in the manifest file.
/// </summary>
public static PowerShellTraceSource GetTraceSource(PowerShellTraceTask task, PowerShellTraceKeywords keywords)
{
return new PowerShellTraceSource(task, keywords);
}
}
}
#endif
namespace Microsoft.PowerShell
{
internal static class NativeCultureResolver
{
internal static void SetThreadUILanguage(Int16 langId) { }
internal static CultureInfo UICulture
{
get
{
return CultureInfo.CurrentUICulture; // this is actually wrong, but until we port "hostifaces\NativeCultureResolver.cs" to Nano, this will do and will help avoid build break.
}
}
internal static CultureInfo Culture
{
get
{
return CultureInfo.CurrentCulture; // this is actually wrong, but until we port "hostifaces\NativeCultureResolver.cs" to Nano, this will do and will help avoid build break.
}
}
}
}
#endregion TEMPORARY
#pragma warning restore 1591, 1572, 1571, 1573, 1587, 1570, 0067
|