mscorlib(4.0.0.0) API with additions
AssemblyReferenceDependentAssemblyEntry.cs
2 using System.Security;
3 
5 {
6  [StructLayout(LayoutKind.Sequential)]
7  internal class AssemblyReferenceDependentAssemblyEntry : IDisposable
8  {
9  [MarshalAs(UnmanagedType.LPWStr)]
10  public string Group;
11 
12  [MarshalAs(UnmanagedType.LPWStr)]
13  public string Codebase;
14 
15  public ulong Size;
16 
17  [MarshalAs(UnmanagedType.SysInt)]
18  public IntPtr HashValue;
19 
20  public uint HashValueSize;
21 
22  public uint HashAlgorithm;
23 
24  public uint Flags;
25 
26  [MarshalAs(UnmanagedType.LPWStr)]
27  public string ResourceFallbackCulture;
28 
29  [MarshalAs(UnmanagedType.LPWStr)]
30  public string Description;
31 
32  [MarshalAs(UnmanagedType.LPWStr)]
33  public string SupportUrl;
34 
35  public ISection HashElements;
36 
37  ~AssemblyReferenceDependentAssemblyEntry()
38  {
39  Dispose(fDisposing: false);
40  }
41 
42  void IDisposable.Dispose()
43  {
44  Dispose(fDisposing: true);
45  }
46 
47  [SecuritySafeCritical]
48  public void Dispose(bool fDisposing)
49  {
50  if (HashValue != IntPtr.Zero)
51  {
52  Marshal.FreeCoTaskMem(HashValue);
53  HashValue = IntPtr.Zero;
54  }
55  if (fDisposing)
56  {
57  GC.SuppressFinalize(this);
58  }
59  }
60  }
61 }
static void FreeCoTaskMem(IntPtr ptr)
Frees a block of memory allocated by the unmanaged COM task memory allocator.
Definition: Marshal.cs:2147
static void SuppressFinalize(object obj)
Requests that the common language runtime not call the finalizer for the specified object.
Definition: GC.cs:308
Provides a mechanism for releasing unmanaged resources.To browse the .NET Framework source code for t...
Definition: IDisposable.cs:8
LayoutKind
Controls the layout of an object when exported to unmanaged code.
Definition: LayoutKind.cs:7
Definition: __Canon.cs:3
UnmanagedType
Identifies how to marshal parameters or fields to unmanaged code.
Definition: UnmanagedType.cs:7
A platform-specific type that is used to represent a pointer or a handle.
Definition: IntPtr.cs:14
Provides a collection of methods for allocating unmanaged memory, copying unmanaged memory blocks,...
Definition: Marshal.cs:15
Controls the system garbage collector, a service that automatically reclaims unused memory.
Definition: GC.cs:11
static readonly IntPtr Zero
A read-only field that represents a pointer or handle that has been initialized to zero.
Definition: IntPtr.cs:20
void Dispose()
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resourc...