System.Deployment.Internal.Isolation.StoreOperationSetDeploymentMetadata.DestroyProperties C# (CSharp) Méthode

DestroyProperties() private static méthode

private static DestroyProperties ( IntPtr rgItems, ulong iItems ) : void
rgItems System.IntPtr
iItems ulong
Résultat void
        private static void DestroyProperties(IntPtr rgItems, ulong iItems)
        {
            if (rgItems != IntPtr.Zero)
            {
                ulong num = (ulong) Marshal.SizeOf(typeof(StoreOperationMetadataProperty));
                for (ulong i = 0L; i < iItems; i += (ulong) 1L)
                {
                    Marshal.DestroyStructure(new IntPtr(((long) (i * num)) + rgItems.ToInt64()), typeof(StoreOperationMetadataProperty));
                }
                Marshal.FreeCoTaskMem(rgItems);
            }
        }

Usage Example

Exemple #1
0
 public void Destroy()
 {
     if (this.PropertiesToSet != IntPtr.Zero)
     {
         StoreOperationSetDeploymentMetadata.DestroyProperties(this.PropertiesToSet, (ulong)this.cPropertiesToSet.ToInt64());
         this.PropertiesToSet  = IntPtr.Zero;
         this.cPropertiesToSet = IntPtr.Zero;
     }
     if (this.PropertiesToTest != IntPtr.Zero)
     {
         StoreOperationSetDeploymentMetadata.DestroyProperties(this.PropertiesToTest, (ulong)this.cPropertiesToTest.ToInt64());
         this.PropertiesToTest  = IntPtr.Zero;
         this.cPropertiesToTest = IntPtr.Zero;
     }
     if (this.InstallerReference != IntPtr.Zero)
     {
         StoreApplicationReference.Destroy(this.InstallerReference);
         this.InstallerReference = IntPtr.Zero;
     }
 }