Exemplo n.º 1
0
 public CoreStatistic GetStatistic()
 {
     try
     {
         object   statisticO = new CoreDll.adStatistic();
         byte[]   statisticB = new byte[Marshal.SizeOf(statisticO)];
         GCHandle statisticH = GCHandle.Alloc(statisticB, GCHandleType.Pinned);
         try
         {
             IntPtr statisticP = statisticH.AddrOfPinnedObject();
             if (m_dll.adStatisticGet(m_handle, statisticP) == CoreDll.Error.Ok)
             {
                 CoreDll.adStatistic statistic = (CoreDll.adStatistic)Marshal.PtrToStructure(statisticP, statisticO.GetType());
                 return(new CoreStatistic(ref statistic));
             }
         }
         finally
         {
             statisticH.Free();
         }
     }
     catch (Exception)
     {
     }
     return(null);
 }
Exemplo n.º 2
0
 public CoreStatistic GetStatistic()
 {
     CoreDll.adStatistic[] statistic = new CoreDll.adStatistic[1];
     if (m_dll.adStatisticGet(m_handle, Marshal.UnsafeAddrOfPinnedArrayElement(statistic, 0)) == CoreDll.Error.Ok)
     {
         return(new CoreStatistic(ref statistic[0]));
     }
     return(null);
 }
Exemplo n.º 3
0
 public CoreStatistic(ref CoreDll.adStatistic statistic)
 {
     scanedFolderNumber   = statistic.scanedFolderNumber.ToUInt32();
     searchedImageNumber  = statistic.searchedImageNumber.ToUInt32();
     collectedImageNumber = statistic.collectedImageNumber.ToUInt32();
     comparedImageNumber  = statistic.comparedImageNumber.ToUInt32();
     collectThreadCount   = statistic.collectThreadCount.ToUInt32();
     compareThreadCount   = statistic.compareThreadCount.ToUInt32();
     defectImageNumber    = statistic.defectImageNumber.ToUInt32();
     duplImagePairNumber  = statistic.duplImagePairNumber.ToUInt32();
     renamedImageNumber   = statistic.renamedImageNumber.ToUInt32();
     deletedImageNumber   = statistic.deletedImageNumber.ToUInt32();
     deletedImageSize     = statistic.deletedImageSize;
 }