mirror of
https://github.com/PowerShell/PowerShell
synced 2026-06-08 12:12:50 +00:00
spelling: locals in src/System.Management.Automation/engine/ComInterop
This commit is contained in:
@@ -18,11 +18,11 @@ namespace System.Management.Automation.ComInterop
|
||||
/// This class implements an event sink for a particular RCW.
|
||||
/// Unlike the implementation of events in TlbImp'd assemblies,
|
||||
/// we will create only one event sink per RCW (theoretically RCW might have
|
||||
/// several ComEventSink evenk sinks - but all these implement different source intefaces).
|
||||
/// several ComEventSink evenk sinks - but all these implement different source interfaces).
|
||||
/// Each ComEventSink contains a list of ComEventSinkMethod objects - which represent
|
||||
/// a single method on the source interface an a multicast delegate to redirect
|
||||
/// the calls. Notice that we are chaining multicast delegates so that same
|
||||
/// ComEventSinkMedhod can invoke multiple event handlers).
|
||||
/// ComEventSinkMethod can invoke multiple event handlers).
|
||||
///
|
||||
/// ComEventSink implements an IDisposable pattern to Unadvise from the connection point.
|
||||
/// Typically, when RCW is finalized the corresponding Dispose will be triggered by
|
||||
|
||||
@@ -29,11 +29,11 @@ namespace System.Management.Automation.ComInterop
|
||||
/// ComEventSink does not, strongly speaking, implements the interface
|
||||
/// that it claims to implement - it is just "faking" it by using IReflect.
|
||||
/// Thus, Word's QIs on the pointer passed to ICP::Advise would fail. To
|
||||
/// prevent this we take advangate of RealProxy's ability of
|
||||
/// prevent this we take advantage of RealProxy's ability of
|
||||
/// "dressing up" like other classes and hence successfully respond to QIs
|
||||
/// for interfaces that it does not really support( it is OK to say
|
||||
/// "I implement this interface" for event sinks only since the common
|
||||
/// practice is to use IDistpach.Invoke when calling into event sinks).
|
||||
/// practice is to use IDispatch.Invoke when calling into event sinks).
|
||||
/// </summary>
|
||||
internal sealed class ComEventSinkProxy : RealProxy
|
||||
{
|
||||
|
||||
@@ -31,7 +31,7 @@ namespace System.Management.Automation.ComInterop
|
||||
|
||||
private VarEnumSelector _varEnumSelector;
|
||||
private string[] _keywordArgNames;
|
||||
private int _totalExplicitArgs; // Includes the individial elements of ArgumentKind.Dictionary (if any)
|
||||
private int _totalExplicitArgs; // Includes the individual elements of ArgumentKind.Dictionary (if any)
|
||||
|
||||
private ParameterExpression _dispatchObject;
|
||||
private ParameterExpression _dispatchPointer;
|
||||
@@ -249,7 +249,7 @@ namespace System.Management.Automation.ComInterop
|
||||
}
|
||||
else
|
||||
{
|
||||
// Positial arguments are in reverse order at the tail of rgArgs
|
||||
// Positional arguments are in reverse order at the tail of rgArgs
|
||||
variantIndex = reverseIndex;
|
||||
}
|
||||
VariantBuilder variantBuilder = _varEnumSelector.VariantBuilders[i];
|
||||
|
||||
@@ -26,7 +26,7 @@ namespace System.Management.Automation.ComInterop
|
||||
# region ctor
|
||||
|
||||
/// <summary>
|
||||
/// Creates a representation for the paramter of a COM method
|
||||
/// Creates a representation for the parameter of a COM method
|
||||
/// </summary>
|
||||
internal ComParamDesc(ref ELEMDESC elemDesc, string name)
|
||||
{
|
||||
|
||||
@@ -59,7 +59,7 @@ namespace System.Management.Automation.ComInterop
|
||||
|
||||
/// <summary>
|
||||
/// Reads the latest registered type library for the corresponding GUID,
|
||||
/// reads definitions of CoClass'es and Enum's from this library
|
||||
/// reads definitions of CoClasses and Enum's from this library
|
||||
/// and creates a IDynamicMetaObjectProvider that allows to instantiate coclasses
|
||||
/// and get actual values for the enums.
|
||||
/// </summary>
|
||||
@@ -78,7 +78,7 @@ namespace System.Management.Automation.ComInterop
|
||||
|
||||
/// <summary>
|
||||
/// Gets an ITypeLib object from OLE Automation compatible RCW ,
|
||||
/// reads definitions of CoClass'es and Enum's from this library
|
||||
/// reads definitions of CoClasses and Enum's from this library
|
||||
/// and creates a IDynamicMetaObjectProvider that allows to instantiate coclasses
|
||||
/// and get actual values for the enums.
|
||||
/// </summary>
|
||||
|
||||
@@ -129,9 +129,9 @@ namespace System.Management.Automation.ComInterop
|
||||
private static int GetIDsOfNames(IDispatch dispatch, string name, out int dispId)
|
||||
{
|
||||
int[] dispIds = new int[1];
|
||||
Guid emtpyRiid = Guid.Empty;
|
||||
Guid emptyRiid = Guid.Empty;
|
||||
int hresult = dispatch.TryGetIDsOfNames(
|
||||
ref emtpyRiid,
|
||||
ref emptyRiid,
|
||||
new string[] { name },
|
||||
1,
|
||||
0,
|
||||
@@ -143,13 +143,13 @@ namespace System.Management.Automation.ComInterop
|
||||
|
||||
private static int Invoke(IDispatch dispatch, int memberDispId, out object result)
|
||||
{
|
||||
Guid emtpyRiid = Guid.Empty;
|
||||
Guid emptyRiid = Guid.Empty;
|
||||
ComTypes.DISPPARAMS dispParams = new ComTypes.DISPPARAMS();
|
||||
ComTypes.EXCEPINFO excepInfo = new ComTypes.EXCEPINFO();
|
||||
uint argErr;
|
||||
int hresult = dispatch.TryInvoke(
|
||||
memberDispId,
|
||||
ref emtpyRiid,
|
||||
ref emptyRiid,
|
||||
0,
|
||||
ComTypes.INVOKEKIND.INVOKE_PROPERTYGET,
|
||||
ref dispParams,
|
||||
@@ -491,7 +491,7 @@ namespace System.Management.Automation.ComInterop
|
||||
|
||||
// Sometimes coclass has multiple source interfaces. Usually this is caused by
|
||||
// adding new events and putting them on new interfaces while keeping the
|
||||
// old interfaces around. This may cause name collisioning which we are
|
||||
// old interfaces around. This may cause name collisions which we are
|
||||
// resolving by keeping only the first event with the same name.
|
||||
if (events.ContainsKey(name) == false)
|
||||
{
|
||||
|
||||
@@ -489,7 +489,7 @@ namespace System.Management.Automation.ComInterop
|
||||
}
|
||||
|
||||
|
||||
// This helper is called when we are looking for a ByVal marhsalling
|
||||
// This helper is called when we are looking for a ByVal marshalling
|
||||
// In a ByVal case we can take into account conversions or IConvertible if all other
|
||||
// attempts to find marshalling type failed
|
||||
private static ArgBuilder GetByValArgBuilder(Type elementType, ref VarEnum elementVarEnum)
|
||||
|
||||
@@ -51,7 +51,7 @@ namespace System.Management.Automation.ComInterop
|
||||
internal static class VariantArray
|
||||
{
|
||||
// Don't need a dictionary for this, it will have very few elements
|
||||
// (guarenteed less than 28, in practice 0-2)
|
||||
// (guaranteed less than 28, in practice 0-2)
|
||||
private static readonly List<Type> s_generatedTypes = new List<Type>(0);
|
||||
|
||||
internal static MemberExpression GetStructField(ParameterExpression variantArray, int field)
|
||||
|
||||
Reference in New Issue
Block a user