internal static unsafe AzureBlobBackupStore FromNative(NativeBackupRestoreTypes.FABRIC_BACKUP_STORE_INFORMATION storeInformation) { var azureBlobStoreInformationNative = *(NativeBackupRestoreTypes.FABRIC_BACKUP_STORE_AZURE_STORAGE_INFORMATION *)storeInformation.StoreAccessInformation; var azureBlobBackupStore = new AzureBlobBackupStore { ConnectionString = NativeTypes.FromNativeString(azureBlobStoreInformationNative.ConnectionString), ContainerName = NativeTypes.FromNativeString(azureBlobStoreInformationNative.ContainerName), FolderPath = NativeTypes.FromNativeString(azureBlobStoreInformationNative.FolderPath), IsAccountKeyEncrypted = NativeTypes.FromBOOLEAN(azureBlobStoreInformationNative.IsConnectionStringEncrypted) }; return(azureBlobBackupStore); }
internal static unsafe BackupStoreInformation FromNative(IntPtr pointer) { var nativeStoreInformation = *(NativeBackupRestoreTypes.FABRIC_BACKUP_STORE_INFORMATION *)pointer; if (nativeStoreInformation.StoreType == NativeBackupRestoreTypes.FABRIC_BACKUP_STORE_TYPE.FABRIC_BACKUP_STORE_TYPE_FILE_SHARE) { return(FileShareBackupStore.FromNative(nativeStoreInformation)); } else if (nativeStoreInformation.StoreType == NativeBackupRestoreTypes.FABRIC_BACKUP_STORE_TYPE.FABRIC_BACKUP_STORE_TYPE_AZURE_STORE) { return(AzureBlobBackupStore.FromNative(nativeStoreInformation)); } return(null); }