void NativeImageStore.IFabricNativeImageStoreProgressEventHandler.OnUpdateProgress(
     UInt64 completedItems,
     UInt64 totalItems,
     NativeImageStore.FABRIC_PROGRESS_UNIT_TYPE itemType)
 {
     if (this.progressHandler != null)
     {
         // unsigned integers are not CLS-compliant
         //
         this.progressHandler.UpdateProgress((long)completedItems, (long)totalItems, ProgressUnitTypeHelper.FromNative(itemType));
     }
 }
Ejemplo n.º 2
0
        public static ProgressUnitType FromNative(NativeImageStore.FABRIC_PROGRESS_UNIT_TYPE native)
        {
            switch (native)
            {
            case NativeImageStore.FABRIC_PROGRESS_UNIT_TYPE.FABRIC_PROGRESS_UNIT_TYPE_BYTES:
            case NativeImageStore.FABRIC_PROGRESS_UNIT_TYPE.FABRIC_PROGRESS_UNIT_TYPE_SERVICE_SUB_PACKAGES:
            case NativeImageStore.FABRIC_PROGRESS_UNIT_TYPE.FABRIC_PROGRESS_UNIT_TYPE_FILES:
                return((ProgressUnitType)native);

            default:
                return(ProgressUnitType.Invalid);
            }
        }