blob: 29b094c9e8946da9eac348f87f7ada7d247b8051 (
plain)
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
|
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
namespace System.Runtime.InteropServices.TCEAdapterGen {
using System;
using System.Reflection;
using System.Collections;
internal class EventItfInfo
{
public EventItfInfo(String strEventItfName,
String strSrcItfName,
String strEventProviderName,
RuntimeAssembly asmImport,
RuntimeAssembly asmSrcItf)
{
m_strEventItfName = strEventItfName;
m_strSrcItfName = strSrcItfName;
m_strEventProviderName = strEventProviderName;
m_asmImport = asmImport;
m_asmSrcItf = asmSrcItf;
}
public Type GetEventItfType()
{
Type t = m_asmImport.GetType(m_strEventItfName, true, false);
if (t != null && !t.IsVisible)
t = null;
return t;
}
public Type GetSrcItfType()
{
Type t = m_asmSrcItf.GetType(m_strSrcItfName, true, false);
if (t != null && !t.IsVisible)
t = null;
return t;
}
public String GetEventProviderName()
{
return m_strEventProviderName;
}
private String m_strEventItfName;
private String m_strSrcItfName;
private String m_strEventProviderName;
private RuntimeAssembly m_asmImport;
private RuntimeAssembly m_asmSrcItf;
}
}
|