internal static unsafe DsmsAzureBlobBackupStore FromNative(NativeBackupRestoreTypes.FABRIC_BACKUP_STORE_INFORMATION storeInformation) { var dsmsAzureBlobStoreInformationNative = *(NativeBackupRestoreTypes.FABRIC_BACKUP_STORE_DSMS_AZURE_STORAGE_INFORMATION *)storeInformation.StoreAccessInformation; var DsmsAzureBlobBackupStore = new DsmsAzureBlobBackupStore { StorageCredentialsSourceLocation = NativeTypes.FromNativeString(dsmsAzureBlobStoreInformationNative.StorageCredentialsSourceLocation), ContainerName = NativeTypes.FromNativeString(dsmsAzureBlobStoreInformationNative.ContainerName), FolderPath = NativeTypes.FromNativeString(dsmsAzureBlobStoreInformationNative.FolderPath), }; return(DsmsAzureBlobBackupStore); }
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)); } else if (nativeStoreInformation.StoreType == NativeBackupRestoreTypes.FABRIC_BACKUP_STORE_TYPE.FABRIC_BACKUP_STORE_TYPE_DSMS_AZURE_STORE) { return(DsmsAzureBlobBackupStore.FromNative(nativeStoreInformation)); } return(null); }