├── .gitattributes ├── .gitignore ├── LICENSE ├── README.md ├── Sandboxable.sln ├── build ├── decrypt.snk.ps1 ├── pack.ps1 └── sign.ps1 └── src ├── Hyak.Common ├── CloudCredentials.cs ├── CloudError.cs ├── CloudException.cs ├── CloudHttpErrorInfo.cs ├── CloudHttpRequestErrorInfo.cs ├── CloudHttpResponseErrorInfo.cs ├── HttpOperationResponse.cs ├── Hyak.Common.csproj ├── Hyak.Common.nuspec ├── ICloudTracingInterceptor.cs ├── ILazyCollection.cs ├── IServiceOperations.cs ├── Internals │ ├── DisposableReference.cs │ ├── HttpExtensions.cs │ ├── IndisposableDelegatingHandler.cs │ └── PortablePlatformAbstraction.cs ├── LazyDictionary.cs ├── LazyList.cs ├── Platform │ ├── HttpTransportHandlerProvider.cs │ └── IHttpTransportHandlerProvider.cs ├── Properties │ ├── AssemblyInfo.cs │ ├── Resources.Designer.cs │ └── Resources.resx ├── RetryHandler.cs ├── ServiceClient.cs ├── TracingAdapter.cs ├── TracingExtensions.cs ├── TransientFaultHandling │ ├── AsyncExecution.cs │ ├── AsyncExecution`.cs │ ├── DefaultHttpErrorDetectionStrategy.cs │ ├── ExponentialBackoff.cs │ ├── FixedInterval.cs │ ├── Guard.cs │ ├── HttpRequestExceptionWithStatus.cs │ ├── ITransientErrorDetectionStrategy.cs │ ├── Incremental.cs │ ├── RetryLimitExceededException.cs │ ├── RetryPolicy.cs │ ├── RetryPolicy`.cs │ ├── RetryStrategy.cs │ ├── RetryingEventArgs.cs │ └── ShouldRetry.cs └── packages.config ├── Microsoft.Azure.Common ├── Credentials │ ├── SubscriptionCloudCredentials.cs │ └── TokenCloudCredentials.cs ├── Handlers │ └── ClientRequestTrackingHandler.cs ├── Microsoft.Azure.Common.csproj ├── Microsoft.Azure.Common.csproj.DotSettings ├── Microsoft.Azure.Common.nuspec ├── Models │ ├── AzureOperationResponse.cs │ ├── OperationStatus.cs │ ├── OperationStatusResponse.cs │ ├── ResourceBase.cs │ ├── ResourceBaseExtended.cs │ └── ResourceIdentity.cs ├── OData │ ├── FilterParameterAttribute.cs │ ├── FilterString.cs │ └── UrlExpressionVisitor.cs ├── Properties │ ├── AssemblyAdditionalInfo.cs │ └── AssemblyInfo.cs ├── Settings.SourceAnalysis └── packages.config ├── Microsoft.Azure.KeyVault ├── Authentication │ ├── HttpBearerChallenge.cs │ ├── HttpBearerChallengeCache.cs │ └── KeyVaultCredential.cs ├── Generated │ ├── IKeyOperations.cs │ ├── IKeyVaultInternalClient.cs │ ├── ISecretOperations.cs │ ├── KeyOpRequestMessageWithRawJsonContent.cs │ ├── KeyOpResponseMessageWithRawJsonContent.cs │ ├── KeyOperations.cs │ ├── KeyOperationsExtensions.cs │ ├── KeyVaultInternalClient.cs │ ├── KeyVaultInternalClientExtensions.cs │ ├── SecretOperations.cs │ ├── SecretOperationsExtensions.cs │ ├── SecretRequestMessageWithRawJsonContent.cs │ └── SecretResponseMessageWithRawJsonContent.cs ├── KeyVaultClient.cs ├── KeyVaultClientException.cs ├── KeyVaultClientExtensions.cs ├── Microsoft.Azure.KeyVault.csproj ├── Microsoft.Azure.KeyVault.nuspec ├── Models │ ├── KeyAttributes.cs │ ├── KeyBundle.cs │ ├── KeyOperationRequest.cs │ ├── KeyOperationResult.cs │ ├── Messages.cs │ ├── Secret.cs │ └── SecretAttributes.cs ├── ObjectIdentifier.cs ├── Properties │ └── AssemblyInfo.cs ├── UnixEpoch.cs ├── UriExtensions.cs ├── WebKey │ ├── Json │ │ └── Base64UrlConverter.cs │ ├── JsonWebKey.cs │ ├── JsonWebKeyEncryptionAlgorithms.cs │ ├── JsonWebKeyOperations.cs │ ├── JsonWebKeySignatureAlgorithms.cs │ └── JsonWebKeyTypes.cs └── packages.config ├── Microsoft.Azure.Management.KeyVault ├── Customization │ └── AccessPolicyEntry.cs ├── Generated │ ├── IKeyVaultManagementClient.cs │ ├── IVaultOperations.cs │ ├── KeyVaultManagementClient.cs │ ├── ResourceBase.cs │ ├── Sku.cs │ ├── Vault.cs │ ├── VaultCreateOrUpdateParameters.cs │ ├── VaultGetResponse.cs │ ├── VaultListResponse.cs │ ├── VaultOperations.cs │ ├── VaultOperationsExtensions.cs │ └── VaultProperties.cs ├── Microsoft.Azure.Management.KeyVault.csproj ├── Microsoft.Azure.Management.KeyVault.csproj.DotSettings ├── Microsoft.Azure.Management.KeyVault.nuspec ├── Properties │ └── AssemblyInfo.cs └── packages.config ├── Microsoft.IdentityModel.Clients.ActiveDirectory ├── ADAL.Common │ ├── Base64UrlEncoder.cs │ ├── CommonAssemblyInfo.cs │ ├── Constants.cs │ ├── DateTimeHelper.cs │ ├── OAuth2Response.cs │ └── OAuthConstants.cs ├── ADAL.NET │ ├── ClientAssertion.cs │ ├── ClientAssertionCertificate.cs │ ├── CryptographyHelper.cs │ ├── JsonWebToken.cs │ └── JsonWebTokenConstants.cs ├── BouncyCastleExtension.cs ├── Microsoft.IdentityModel.Clients.ActiveDirectory.csproj ├── Microsoft.IdentityModel.Clients.ActiveDirectory.csproj.DotSettings ├── Microsoft.IdentityModel.Clients.ActiveDirectory.nuspec ├── Properties │ └── AssemblyInfo.cs └── packages.config ├── Microsoft.WindowsAzure.Storage ├── AccessCondition.cs ├── Analytics │ ├── CapacityEntity.cs │ ├── CloudAnalyticsClient.cs │ ├── LogRecord.cs │ ├── LogRecordStreamReader.cs │ └── MetricsEntity.cs ├── Auth │ ├── Protocol │ │ ├── IAuthenticationHandler.cs │ │ ├── NoOpAuthenticationHandler.cs │ │ ├── SharedKeyAuthenticationHandler.cs │ │ └── SharedKeyLiteAuthenticationHandler.cs │ ├── StorageAccountKey.cs │ └── StorageCredentials.cs ├── AuthenticationScheme.cs ├── Blob │ ├── BlobAttributes.cs │ ├── BlobContainerPermissions.cs │ ├── BlobContainerProperties.cs │ ├── BlobContainerPublicAccessType.cs │ ├── BlobContinuationToken.cs │ ├── BlobEncryptedWriteStream.cs │ ├── BlobEncryptionData.cs │ ├── BlobEncryptionMode.cs │ ├── BlobEncryptionPolicy.cs │ ├── BlobListingDetails.cs │ ├── BlobProperties.cs │ ├── BlobReadStream.cs │ ├── BlobReadStreamBase.cs │ ├── BlobRequestOptions.cs │ ├── BlobResultSegment.cs │ ├── BlobType.cs │ ├── BlobWriteStream.cs │ ├── BlobWriteStreamBase.cs │ ├── BlockListingFilter.cs │ ├── BlockSearchMode.cs │ ├── CloudAppendBlob.Common.cs │ ├── CloudAppendBlob.cs │ ├── CloudBlob.Common.cs │ ├── CloudBlob.cs │ ├── CloudBlobClient.Common.cs │ ├── CloudBlobClient.cs │ ├── CloudBlobContainer.Common.cs │ ├── CloudBlobContainer.cs │ ├── CloudBlobDirectory.Common.cs │ ├── CloudBlobDirectory.cs │ ├── CloudBlobStream.cs │ ├── CloudBlockBlob.Common.cs │ ├── CloudBlockBlob.cs │ ├── CloudPageBlob.Common.cs │ ├── CloudPageBlob.cs │ ├── ContainerListingDetails.cs │ ├── ContainerResultSegment.cs │ ├── CopyState.cs │ ├── CopyStatus.cs │ ├── DeleteSnapshotsOption.cs │ ├── ICloudBlob.Common.cs │ ├── ICloudBlob.cs │ ├── IListBlobItem.cs │ ├── LeaseAction.cs │ ├── LeaseDuration.cs │ ├── LeaseState.cs │ ├── LeaseStatus.cs │ ├── ListBlockItem.cs │ ├── PageDiffRange.cs │ ├── PageRange.cs │ ├── ParallelDownloadStream.cs │ ├── ParallelDownloadToFile.cs │ ├── PremiumPageBlobTier.cs │ ├── Protocol │ │ ├── BlobAccessPolicyResponse.cs │ │ ├── BlobContainerEntry.cs │ │ ├── BlobErrorCodeStrings.cs │ │ ├── BlobHttpRequestMessageFactory.cs │ │ ├── BlobHttpResponseParsers.Common.cs │ │ ├── BlobHttpResponseParsers.cs │ │ ├── BlobHttpWebRequestFactory.cs │ │ ├── BlobListingContext.cs │ │ ├── BlobRequest.cs │ │ ├── ContainerHttpRequestMessageFactory.cs │ │ ├── ContainerHttpResponseParsers.Common.cs │ │ ├── ContainerHttpResponseParsers.cs │ │ ├── ContainerHttpWebRequestFactory.cs │ │ ├── GetBlockListResponse.cs │ │ ├── GetPageDiffRangesResponse.cs │ │ ├── GetPageRangesResponse.cs │ │ ├── IListBlobEntry.cs │ │ ├── ListBlobEntry.cs │ │ ├── ListBlobPrefixEntry.cs │ │ ├── ListBlobsResponse.cs │ │ ├── ListContainersResponse.cs │ │ ├── PageWrite.cs │ │ └── PutBlockListItem.cs │ ├── ReadLengthLimitingStream.cs │ ├── RehydrationStatus.cs │ ├── SequenceNumberAction.cs │ ├── SharedAccessBlobHeaders.cs │ ├── SharedAccessBlobPermissions.cs │ ├── SharedAccessBlobPolicies.cs │ ├── SharedAccessBlobPolicy.cs │ ├── StandardBlobTier.cs │ └── SubStream.cs ├── CloudStorageAccount.cs ├── Core │ ├── Auth │ │ ├── ICanonicalizer.cs │ │ ├── SharedAccessSignatureHelper.cs │ │ ├── SharedKeyCanonicalizer.cs │ │ ├── SharedKeyLiteCanonicalizer.cs │ │ ├── SharedKeyLiteTableCanonicalizer.cs │ │ └── SharedKeyTableCanonicalizer.cs │ ├── BlobDecryptStream.cs │ ├── ByteCountingStream.cs │ ├── CanonicalizedString.cs │ ├── CommandLocationMode.cs │ ├── Executor │ │ ├── ExecutionState.cs │ │ ├── Executor.cs │ │ ├── ExecutorBase.cs │ │ ├── ExecutorOperation.cs │ │ ├── RESTCommand.cs │ │ ├── RecoveryActions.cs │ │ ├── StorageCommandBase.cs │ │ ├── TableCommand.cs │ │ └── TableExecutor.cs │ ├── LengthLimitingStream.cs │ ├── Logger.Common.cs │ ├── Logger.cs │ ├── MultiBufferMemoryStream.cs │ ├── NonCloseableStream.cs │ ├── NullType.cs │ ├── SR.cs │ ├── SasQueryBuilder.cs │ ├── StorageEventSource.cs │ ├── StorageRequestMessage.cs │ ├── SyncMemoryStream.cs │ ├── UriQueryBuilder.cs │ └── Util │ │ ├── APMWithTimeout.cs │ │ ├── AsyncExtensions.cs │ │ ├── AsyncSemaphore.Common.cs │ │ ├── AsyncSemaphore.cs │ │ ├── AsyncStreamCopier.cs │ │ ├── AuthenticationUtility.cs │ │ ├── CancellableAsyncResultTaskWrapper.cs │ │ ├── CancellableOperationBase.cs │ │ ├── CommonUtility.cs │ │ ├── CounterEvent.cs │ │ ├── CryptoUtility.cs │ │ ├── CultureStringComparer.cs │ │ ├── Exceptions.cs │ │ ├── GCWatcher.cs │ │ ├── HttpResponseMessageUtils.cs │ │ ├── HttpWebUtility.cs │ │ ├── MD5Wrapper.cs │ │ ├── NavigationHelper.cs │ │ ├── PlatformAgnosticReflectionExtensions.cs │ │ ├── StorageAsyncResult.cs │ │ ├── StorageCommandAsyncResult.cs │ │ ├── StorageProgress.cs │ │ ├── StreamDescriptor.cs │ │ ├── StreamExtensions.cs │ │ └── TaskExtensions.cs ├── DoesServiceRequestAttribute.cs ├── EncryptionAgent.cs ├── EncryptionAlgorithm.cs ├── EncryptionData.cs ├── ExceptionInfo.cs ├── File │ ├── CloudFile.Common.cs │ ├── CloudFile.cs │ ├── CloudFileAttributes.cs │ ├── CloudFileClient.Common.cs │ ├── CloudFileClient.cs │ ├── CloudFileDirectory.Common.cs │ ├── CloudFileDirectory.cs │ ├── CloudFileShare.Common.cs │ ├── CloudFileShare.cs │ ├── CloudFileStream.cs │ ├── DeleteShareSnapshotsOption.cs │ ├── FileContinuationToken.cs │ ├── FileDirectoryProperties.cs │ ├── FileProperties.cs │ ├── FileRange.cs │ ├── FileReadStream.cs │ ├── FileReadStreamBase.cs │ ├── FileRequestOptions.cs │ ├── FileResultSegment.cs │ ├── FileSharePermissions.cs │ ├── FileShareProperties.cs │ ├── FileSharePublicAccessType.cs │ ├── FileWriteStream.cs │ ├── FileWriteStreamBase.cs │ ├── IListFileItem.cs │ ├── Protocol │ │ ├── DirectoryHttpResponseParsers.cs │ │ ├── DirectoryHttpWebRequestFactory.cs │ │ ├── FileAccessPolicyResponse.cs │ │ ├── FileErrorCodeStrings.cs │ │ ├── FileHttpResponseParsers.Common.cs │ │ ├── FileHttpResponseParsers.cs │ │ ├── FileHttpWebRequestFactory.cs │ │ ├── FileListingContext.cs │ │ ├── FileRangeWrite.cs │ │ ├── FileRequest.cs │ │ ├── FileServiceProperties.cs │ │ ├── FileShareEntry.cs │ │ ├── IListFileEntry.cs │ │ ├── ListFileDirectoryEntry.cs │ │ ├── ListFileEntry.cs │ │ ├── ListFilesAndDirectoriesResponse.cs │ │ ├── ListRangesResponse.cs │ │ ├── ListSharesResponse.cs │ │ ├── ShareHttpResponseParsers.cs │ │ ├── ShareHttpWebRequestFactory.cs │ │ └── ShareStats.cs │ ├── ShareListingDetails.cs │ ├── ShareResultSegment.cs │ ├── SharedAccessFileHeaders.cs │ ├── SharedAccessFilePermissions.cs │ ├── SharedAccessFilePolicies.cs │ └── SharedAccessFilePolicy.cs ├── GlobalSuppressions.cs ├── IBufferManager.cs ├── ICancellableAsyncResult.cs ├── IContinuationToken.cs ├── IPAddressOrRange.cs ├── IRequestOptions.cs ├── LogLevel.cs ├── Microsoft.WindowsAzure.Storage.csproj ├── Microsoft.WindowsAzure.Storage.nuspec ├── NameValidator.cs ├── OperationContext.cs ├── Properties │ └── AssemblyInfo.cs ├── Queue │ ├── CloudQueue.Common.cs │ ├── CloudQueue.cs │ ├── CloudQueueClient.Common.cs │ ├── CloudQueueClient.cs │ ├── CloudQueueEncryptedMessage.cs │ ├── CloudQueueMessage.Common.cs │ ├── CloudQueueMessage.cs │ ├── MessageUpdateFields.cs │ ├── Protocol │ │ ├── GetMessagesResponse.cs │ │ ├── ListQueuesResponse.cs │ │ ├── QueueAccessPolicyResponse.cs │ │ ├── QueueEntry.cs │ │ ├── QueueErrorCodeStrings.cs │ │ ├── QueueHttpRequestMessageFactory.cs │ │ ├── QueueHttpResponseParsers.Common.cs │ │ ├── QueueHttpResponseParsers.cs │ │ ├── QueueHttpWebRequestFactory.cs │ │ ├── QueueListingContext.cs │ │ ├── QueueListingDetails.cs │ │ ├── QueueMessage.cs │ │ ├── QueuePermissions.cs │ │ └── QueueRequest.cs │ ├── QueueContinuationToken.cs │ ├── QueueEncryptionPolicy.cs │ ├── QueueMessageType.cs │ ├── QueueRequestOptions.cs │ ├── QueueResultSegment.cs │ ├── SharedAccessQueuePermissions.cs │ ├── SharedAccessQueuePolicies.cs │ └── SharedAccessQueuePolicy.cs ├── RequestEventArgs.cs ├── RequestResult.cs ├── ResultSegment.cs ├── RetryPolicies │ ├── ExponentialRetry.cs │ ├── IExtendedRetryPolicy.cs │ ├── IRetryPolicy.cs │ ├── LinearRetry.cs │ ├── LocationMode.cs │ ├── NoRetry.cs │ ├── RetryContext.cs │ └── RetryInfo.cs ├── Shared │ └── Protocol │ │ ├── AccessPolicyResponseBase.cs │ │ ├── CappedLengthReadOnlyStream.cs │ │ ├── Constants.cs │ │ ├── CorsHttpMethods.cs │ │ ├── CorsProperties.cs │ │ ├── CorsRule.cs │ │ ├── GeoReplicationStats.cs │ │ ├── GeoReplicationStatus.cs │ │ ├── HttpContentFactory.cs │ │ ├── HttpRequestMessageFactory.cs │ │ ├── HttpResponseParsers.Common.cs │ │ ├── HttpResponseParsers.cs │ │ ├── HttpWebRequestFactory.cs │ │ ├── ListingContext.cs │ │ ├── LoggingOperations.cs │ │ ├── LoggingProperties.cs │ │ ├── MetricsLevel.cs │ │ ├── MetricsProperties.cs │ │ ├── Request.cs │ │ ├── RequestMessageExtensions.cs │ │ ├── Response.cs │ │ ├── ResponseParsingBase.cs │ │ ├── RetryableStreamContent.cs │ │ ├── ServiceProperties.cs │ │ ├── ServiceStats.cs │ │ ├── StorageErrorCodeStrings.cs │ │ ├── StorageService.cs │ │ └── WebRequestExtensions.cs ├── SharedAccessAccountPermissions.cs ├── SharedAccessAccountPolicy.cs ├── SharedAccessAccountResourceTypes.cs ├── SharedAccessAccountServices.cs ├── SharedAccessProtocol.cs ├── StorageException.cs ├── StorageExtendedErrorInformation.cs ├── StorageLocation.cs ├── StorageUri.cs ├── StreamExtension.cs ├── Table │ ├── CloudTable.Common.cs │ ├── CloudTable.cs │ ├── CloudTableClient.Common.cs │ ├── CloudTableClient.cs │ ├── DataServices │ │ ├── DataServicesResponseAdapterMessage.cs │ │ ├── TableServiceContext.cs │ │ ├── TableServiceEntity.cs │ │ ├── TableServiceExtensions.cs │ │ └── TableServiceQuery.cs │ ├── DynamicTableEntity.cs │ ├── EdmType.cs │ ├── EncryptPropertyAttribute.cs │ ├── EntityProperty.cs │ ├── EntityPropertyConverter.cs │ ├── EntityPropertyConverterOptions.cs │ ├── EntityReadFlags.cs │ ├── EntityResolver.cs │ ├── EntityUtilities.cs │ ├── ITableEntity.cs │ ├── IgnorePropertyAttribute.cs │ ├── KeyRotationEntity.cs │ ├── ODataErrorHelper.cs │ ├── Protocol │ │ ├── HttpRequestAdapterMessage.cs │ │ ├── HttpResponseAdapterMessage.cs │ │ ├── HttpWebRequestAdapterMessage.cs │ │ ├── TableAccessPolicyResponse.cs │ │ ├── TableConstants.cs │ │ ├── TableErrorCodeStrings.cs │ │ ├── TableHttpRequestMessageFactory.cs │ │ ├── TableHttpWebRequestFactory.cs │ │ ├── TableHttpWebResponseParsers.cs │ │ ├── TableOperationHttpRequestFactory.cs │ │ ├── TableOperationHttpResponseParsers.cs │ │ ├── TableRequest.cs │ │ └── TableUtilities.cs │ ├── QueryComparisons.cs │ ├── Queryable │ │ ├── ALinqExpressionVisitor.cs │ │ ├── ClientConvert.cs │ │ ├── Common.cs │ │ ├── DataServiceExpressionVisitor.cs │ │ ├── EntityResolverQueryOptionExpression.cs │ │ ├── Evaluator.cs │ │ ├── ExpressionNormalizer.cs │ │ ├── ExpressionParser.cs │ │ ├── ExpressionWriter.cs │ │ ├── FilterQueryOptionExpression.cs │ │ ├── InputBinder.cs │ │ ├── InputReferenceExpression.cs │ │ ├── MemberAssignmentAnalysis.cs │ │ ├── NavigationPropertySingletonExpression.cs │ │ ├── OperationContextQueryOptionExpression.cs │ │ ├── PathBox.cs │ │ ├── ProjectionAnalyzer.cs │ │ ├── ProjectionQueryOptionExpression.cs │ │ ├── ProjectionRewriter.cs │ │ ├── QueryOptionExpression.cs │ │ ├── ReferenceEqualityComparer.cs │ │ ├── ReflectionUtil.cs │ │ ├── RequestOptionsQueryOptionExpression.cs │ │ ├── ResourceBinder.cs │ │ ├── ResourceExpression.cs │ │ ├── ResourceExpressionType.cs │ │ ├── ResourceSetExpression.cs │ │ ├── TableQueryableExtensions.cs │ │ ├── TakeQueryOptionExpression.cs │ │ ├── TypeSystem.cs │ │ ├── UriHelper.cs │ │ ├── WebConvert.cs │ │ └── XmlConstants.cs │ ├── SharedAccessTablePermissions.cs │ ├── SharedAccessTablePolicies.cs │ ├── SharedAccessTablePolicy.cs │ ├── TableBatchOperation.Common.cs │ ├── TableBatchOperation.cs │ ├── TableContinuationToken.cs │ ├── TableEncryptionPolicy.cs │ ├── TableEntity.cs │ ├── TableEntityAdapter.cs │ ├── TableOperation.Common.cs │ ├── TableOperation.cs │ ├── TableOperationType.cs │ ├── TableOperators.cs │ ├── TablePayloadFormat.cs │ ├── TablePermissions.cs │ ├── TableQuery.Common.cs │ ├── TableQuery.cs │ ├── TableQueryGeneric.Common.cs │ ├── TableQueryNonGeneric.cs │ ├── TableQueryProvider.cs │ ├── TableQuerySegment.cs │ ├── TableQuerySegmentNonGeneric.cs │ ├── TableRequestOptions.cs │ ├── TableResult.cs │ ├── TableResultSegment.cs │ ├── TableServiceTable.cs │ ├── TableStorageEntityContainer.cs │ └── TableStorageModel.cs ├── TaskExtension.cs ├── WrappedKey.cs └── packages.config ├── SandboxTester └── SandboxTester │ ├── App.config │ ├── Program.cs │ ├── Properties │ └── AssemblyInfo.cs │ ├── SandboxTester.csproj │ └── SandboxTester.snk ├── SandboxTesterUntrusted ├── Properties │ └── AssemblyInfo.cs ├── SandboxTesterUntrusted.csproj ├── TestCode.cs ├── app.config └── packages.config ├── development.snk └── release.snk.enc /build/decrypt.snk.ps1: -------------------------------------------------------------------------------- 1 | if ($env:APPVEYOR_PULL_REQUEST_NUMBER -ne $null) { 2 | Write-Host -ForegroundColor Magenta "This is a pull request build, using development.snk" 3 | } else { 4 | Write-Host -ForegroundColor Magenta "This is not a pull request build, using release.snk" 5 | nuget install secure-file -ExcludeVersion -NonInteractive -Verbosity normal 6 | secure-file\tools\secure-file -decrypt src\release.snk.enc -secret "$env:snkpassword" 7 | } -------------------------------------------------------------------------------- /build/pack.ps1: -------------------------------------------------------------------------------- 1 | # Get Git range 2 | $merge = $false 3 | $parents = (git log -1 --pretty=format:%p) 4 | if ($parents -match " ") { 5 | Write-Host "This is a build with a merge" 6 | $merge = $true 7 | $parents = $parents.replace(" ", "..") 8 | } 9 | 10 | # Version number 11 | $version = $env:APPVEYOR_BUILD_VERSION 12 | if ($env:APPVEYOR_PULL_REQUEST_NUMBER -ne $null) { 13 | Write-Host "This is a pull request build" 14 | $version = "$version-preview" 15 | } 16 | Write-Host "Build version number is $version" 17 | 18 | function Pack-Nuget([string]$Name) { 19 | Write-Host "Checking if commit contains files for package $name" -NoNewline 20 | if ((git log -1 --pretty=format:%H) -eq (git log -1 --pretty=format:%H src/$name) -or ($merge -and (git log $parents --pretty=format:%H src/$name).length -gt 0)) { 21 | Write-Host -ForegroundColor Green " -- Yep" 22 | Write-Host 23 | nuget pack src\$name\$name.nuspec -version $version 24 | Write-Host 25 | } else { 26 | Write-Host -ForegroundColor Red " -- Nope" 27 | } 28 | } 29 | 30 | Pack-Nuget -Name Hyak.Common 31 | Pack-Nuget -Name Microsoft.Azure.Common 32 | Pack-Nuget -Name Microsoft.Azure.KeyVault 33 | Pack-Nuget -Name Microsoft.IdentityModel.Clients.ActiveDirectory 34 | Pack-Nuget -Name Microsoft.Azure.Management.KeyVault 35 | Pack-Nuget -Name Microsoft.WindowsAzure.Storage -------------------------------------------------------------------------------- /build/sign.ps1: -------------------------------------------------------------------------------- 1 | if ($env:APPVEYOR_PULL_REQUEST_NUMBER -eq $null) { 2 | Get-ChildItem .\src\*\*.csproj | % { 3 | $xml = ([xml](Get-Content $_ -Encoding UTF8)); 4 | $filename = $_.FullName; 5 | $update = $false; 6 | 7 | Write-Host "Checking $filename for development Signing Key File" 8 | 9 | $xml.Project.PropertyGroup | ? { $_.AssemblyOriginatorKeyFile -ne $null } | % { 10 | $_.AssemblyOriginatorKeyFile = $_.AssemblyOriginatorKeyFile -replace "development", "release"; 11 | $update = $true 12 | }; 13 | 14 | if ($update) { 15 | $xml.Save($filename); 16 | Write-Host -ForegroundColor Magenta "$filename updated" 17 | } 18 | } 19 | } -------------------------------------------------------------------------------- /src/Hyak.Common/CloudCredentials.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Net.Http; 3 | using System.Threading; 4 | using System.Threading.Tasks; 5 | 6 | namespace Sandboxable.Hyak.Common 7 | { 8 | public abstract class CloudCredentials 9 | { 10 | /// 11 | /// Apply the credentials to the HTTP request. 12 | /// 13 | /// The HTTP request. 14 | /// Cancellation token. 15 | /// 16 | /// Task that will complete when processing has completed. 17 | /// 18 | public virtual Task ProcessHttpRequestAsync(HttpRequestMessage request, CancellationToken cancellationToken) 19 | { 20 | return Task.FromResult(null); 21 | } 22 | 23 | public virtual void InitializeServiceClient(ServiceClient client) 24 | where T : ServiceClient 25 | { 26 | } 27 | } 28 | } -------------------------------------------------------------------------------- /src/Hyak.Common/CloudError.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace Sandboxable.Hyak.Common 4 | { 5 | /// 6 | /// Representation of the error object from the server. 7 | /// 8 | public class CloudError 9 | { 10 | /// 11 | /// Parsed error code. 12 | /// 13 | public string Code 14 | { 15 | get; 16 | set; 17 | } 18 | 19 | /// 20 | /// Parsed error message. 21 | /// 22 | public string Message 23 | { 24 | get; 25 | set; 26 | } 27 | 28 | /// 29 | /// Original error body 30 | /// 31 | public string OriginalMessage 32 | { 33 | get; 34 | set; 35 | } 36 | 37 | /// 38 | /// Original response message body 39 | /// 40 | public object ResponseBody 41 | { 42 | get; 43 | set; 44 | } 45 | } 46 | } -------------------------------------------------------------------------------- /src/Hyak.Common/HttpOperationResponse.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Net; 3 | 4 | namespace Sandboxable.Hyak.Common 5 | { 6 | /// 7 | /// A standard service response including an HTTP status code and request 8 | /// ID. 9 | /// 10 | public class HttpOperationResponse 11 | { 12 | /// 13 | /// Gets or sets the standard HTTP status code from the REST API 14 | /// operations for the Service Management API. 15 | /// 16 | public HttpStatusCode StatusCode 17 | { 18 | get; 19 | set; 20 | } 21 | } 22 | } -------------------------------------------------------------------------------- /src/Hyak.Common/Hyak.Common.nuspec: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | Sandboxable.Hyak.Common 5 | 0.0.0.0 6 | Winvision 7 | This library is adjusted to run in a Partial Trust environment. Provides infrastructure for common error handling, tracing, configuration for REST clients. 8 | en-US 9 | https://github.com/Winvision/Sandboxable 10 | https://github.com/Winvision/Sandboxable/blob/master/LICENSE 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /src/Hyak.Common/ILazyCollection.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace Sandboxable.Hyak.Common 4 | { 5 | public interface ILazyCollection 6 | { 7 | bool IsInitialized 8 | { 9 | get; 10 | } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /src/Hyak.Common/IServiceOperations.cs: -------------------------------------------------------------------------------- 1 | namespace Sandboxable.Hyak.Common 2 | { 3 | /// 4 | /// Interface used to represent resource groupings of ServiceClient 5 | /// operations. 6 | /// 7 | /// Type of the ServiceClient. 8 | public interface IServiceOperations where TClient : ServiceClient 9 | { 10 | /// Gets a reference to the ServiceClient. 11 | TClient Client { get; } 12 | } 13 | } -------------------------------------------------------------------------------- /src/Hyak.Common/Internals/DisposableReference.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace Sandboxable.Hyak.Common.Internals 4 | { 5 | /// 6 | /// Wrapper class that provides manual reference count functionality 7 | /// 8 | /// Type to wrap around. Must be disposable. 9 | internal class DisposableReference : IDisposable 10 | where T : class, IDisposable 11 | { 12 | private readonly object _lock = new object(); 13 | 14 | public T Reference 15 | { 16 | get; 17 | private set; 18 | } 19 | 20 | public uint ReferenceCount 21 | { 22 | get; 23 | private set; 24 | } 25 | 26 | public DisposableReference(T reference) 27 | { 28 | if (reference == null) 29 | { 30 | throw new ArgumentNullException(nameof(reference)); 31 | } 32 | 33 | this.Reference = reference; 34 | this.ReferenceCount = 1; 35 | } 36 | 37 | public void AddReference() 38 | { 39 | lock (this._lock) 40 | { 41 | var referenceCount = this; 42 | referenceCount.ReferenceCount = referenceCount.ReferenceCount + 1; 43 | } 44 | } 45 | 46 | public void ReleaseReference() 47 | { 48 | lock (this._lock) 49 | { 50 | if ((int)this.ReferenceCount == 0) 51 | { 52 | throw new ObjectDisposedException(typeof(T).FullName); 53 | } 54 | 55 | if ((int)--this.ReferenceCount != 0) 56 | { 57 | return; 58 | } 59 | 60 | this.Reference.Dispose(); 61 | this.Reference = default(T); 62 | } 63 | } 64 | 65 | void IDisposable.Dispose() 66 | { 67 | this.ReleaseReference(); 68 | } 69 | } 70 | } -------------------------------------------------------------------------------- /src/Hyak.Common/Internals/HttpExtensions.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Net.Http; 3 | using System.Net.Http.Headers; 4 | 5 | namespace Sandboxable.Hyak.Common.Internals 6 | { 7 | public static class HttpExtensions 8 | { 9 | /// 10 | /// Get the HTTP message content as a string. 11 | /// 12 | /// The HTTP content. 13 | /// The HTTP message content as a string. 14 | public static string AsString(this HttpContent content) 15 | { 16 | try 17 | { 18 | if (content != null) 19 | { 20 | var configuredTaskAwaitable = content.ReadAsStringAsync().ConfigureAwait(false); 21 | 22 | return configuredTaskAwaitable.GetAwaiter().GetResult(); 23 | } 24 | } 25 | catch (ObjectDisposedException) 26 | { 27 | } 28 | 29 | return null; 30 | } 31 | 32 | public static HttpHeaders GetContentHeaders(this HttpRequestMessage request) 33 | { 34 | try 35 | { 36 | if (request?.Content != null) 37 | { 38 | return request.Content.Headers; 39 | } 40 | } 41 | catch (ObjectDisposedException) 42 | { 43 | } 44 | 45 | return null; 46 | } 47 | 48 | public static HttpHeaders GetContentHeaders(this HttpResponseMessage response) 49 | { 50 | try 51 | { 52 | if (response?.Content != null) 53 | { 54 | return response.Content.Headers; 55 | } 56 | } 57 | catch (ObjectDisposedException) 58 | { 59 | } 60 | 61 | return null; 62 | } 63 | } 64 | } -------------------------------------------------------------------------------- /src/Hyak.Common/Internals/IndisposableDelegatingHandler.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Net.Http; 3 | 4 | namespace Sandboxable.Hyak.Common.Internals 5 | { 6 | /// 7 | /// Wrapper class for HttpMessageHandler that prevents InnerHandler from 8 | /// being disposed. 9 | /// 10 | internal class IndisposableDelegatingHandler : DelegatingHandler 11 | { 12 | /// 13 | /// Initializes a new instance of the class from HttpMessageHandler. 14 | /// 15 | /// InnerHandler to wrap. 16 | public IndisposableDelegatingHandler(HttpMessageHandler innerHandler) 17 | : base(innerHandler) 18 | { 19 | } 20 | 21 | /// 22 | /// Overrides Dispose of the base class to prevent disposal of the InnerHandler. 23 | /// 24 | /// If set to true indicates the method is being called from Dispose(). 25 | protected override void Dispose(bool disposing) 26 | { 27 | } 28 | } 29 | } -------------------------------------------------------------------------------- /src/Hyak.Common/Platform/HttpTransportHandlerProvider.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Net.Http; 3 | 4 | namespace Sandboxable.Hyak.Common.Platform 5 | { 6 | public class HttpTransportHandlerProvider : IHttpTransportHandlerProvider 7 | { 8 | public HttpTransportHandlerProvider() 9 | { 10 | } 11 | 12 | public HttpMessageHandler CreateHttpTransportHandler() 13 | { 14 | return new WebRequestHandler(); 15 | } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /src/Hyak.Common/Platform/IHttpTransportHandlerProvider.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Net.Http; 3 | 4 | namespace Sandboxable.Hyak.Common.Platform 5 | { 6 | public interface IHttpTransportHandlerProvider 7 | { 8 | HttpMessageHandler CreateHttpTransportHandler(); 9 | } 10 | } -------------------------------------------------------------------------------- /src/Hyak.Common/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Resources; 3 | 4 | [assembly: AssemblyTitle("Sandboxable Hyak Common Library")] 5 | [assembly: AssemblyDescription("Provides infrastructure for common error handling, tracing, configuration for REST clients.")] 6 | 7 | [assembly: AssemblyConfiguration("")] 8 | [assembly: AssemblyCompany("Microsoft")] 9 | [assembly: AssemblyProduct("Sandboxable Hyak Common Library")] 10 | [assembly: AssemblyCopyright("Copyright (c) Microsoft Corporation")] 11 | [assembly: AssemblyTrademark("")] 12 | [assembly: AssemblyCulture("")] 13 | [assembly: NeutralResourcesLanguage("en")] 14 | [assembly: AssemblyVersion("1.0.0.0")] 15 | [assembly: AssemblyFileVersion("1.0.2.0")] 16 | -------------------------------------------------------------------------------- /src/Hyak.Common/TransientFaultHandling/DefaultHttpErrorDetectionStrategy.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Net; 3 | 4 | namespace Sandboxable.Hyak.Common.TransientFaultHandling 5 | { 6 | public class DefaultHttpErrorDetectionStrategy : ITransientErrorDetectionStrategy 7 | { 8 | public bool IsTransient(Exception ex) 9 | { 10 | var httpRequestExceptionWithStatus = ex as HttpRequestExceptionWithStatus; 11 | if (httpRequestExceptionWithStatus != null && (httpRequestExceptionWithStatus.StatusCode == HttpStatusCode.RequestTimeout 12 | || httpRequestExceptionWithStatus.StatusCode >= HttpStatusCode.InternalServerError 13 | && httpRequestExceptionWithStatus.StatusCode != HttpStatusCode.NotImplemented 14 | && httpRequestExceptionWithStatus.StatusCode != HttpStatusCode.HttpVersionNotSupported)) 15 | { 16 | return true; 17 | } 18 | 19 | return false; 20 | } 21 | } 22 | } -------------------------------------------------------------------------------- /src/Hyak.Common/TransientFaultHandling/HttpRequestExceptionWithStatus.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Net; 3 | using System.Net.Http; 4 | 5 | namespace Sandboxable.Hyak.Common.TransientFaultHandling 6 | { 7 | public class HttpRequestExceptionWithStatus : HttpRequestException 8 | { 9 | public HttpStatusCode StatusCode 10 | { 11 | get; 12 | set; 13 | } 14 | 15 | public HttpRequestExceptionWithStatus() 16 | { 17 | } 18 | 19 | public HttpRequestExceptionWithStatus(string message) 20 | : base(message) 21 | { 22 | } 23 | 24 | public HttpRequestExceptionWithStatus(string message, Exception inner) 25 | : base(message, inner) 26 | { 27 | } 28 | } 29 | } -------------------------------------------------------------------------------- /src/Hyak.Common/TransientFaultHandling/ITransientErrorDetectionStrategy.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace Sandboxable.Hyak.Common.TransientFaultHandling 4 | { 5 | /// 6 | /// Defines an interface that must be implemented by custom components responsible for detecting specific transient conditions. 7 | /// 8 | public interface ITransientErrorDetectionStrategy 9 | { 10 | /// 11 | /// Determines whether the specified exception represents a transient failure that can be compensated by a retry. 12 | /// 13 | /// The exception object to be verified. 14 | /// true if the specified exception is considered as transient; otherwise, false. 15 | bool IsTransient(Exception ex); 16 | } 17 | } -------------------------------------------------------------------------------- /src/Hyak.Common/TransientFaultHandling/RetryPolicy`.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace Sandboxable.Hyak.Common.TransientFaultHandling 4 | { 5 | public class RetryPolicy : RetryPolicy 6 | where T : ITransientErrorDetectionStrategy, new() 7 | { 8 | public RetryPolicy(RetryStrategy retryStrategy) 9 | : base(default(T) == null ? Activator.CreateInstance() : default(T), retryStrategy) 10 | { 11 | } 12 | 13 | public RetryPolicy(int retryCount) 14 | : base(default(T) == null ? Activator.CreateInstance() : default(T), retryCount) 15 | { 16 | } 17 | 18 | public RetryPolicy(int retryCount, TimeSpan retryInterval) 19 | : base(default(T) == null ? Activator.CreateInstance() : default(T), retryCount, retryInterval) 20 | { 21 | } 22 | 23 | public RetryPolicy(int retryCount, TimeSpan minBackoff, TimeSpan maxBackoff, TimeSpan deltaBackoff) 24 | : base(default(T) == null ? Activator.CreateInstance() : default(T), retryCount, minBackoff, maxBackoff, deltaBackoff) 25 | { 26 | } 27 | 28 | public RetryPolicy(int retryCount, TimeSpan initialInterval, TimeSpan increment) 29 | : base(default(T) == null ? Activator.CreateInstance() : default(T), retryCount, initialInterval, increment) 30 | { 31 | } 32 | } 33 | } -------------------------------------------------------------------------------- /src/Hyak.Common/TransientFaultHandling/ShouldRetry.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace Sandboxable.Hyak.Common.TransientFaultHandling 4 | { 5 | /// 6 | /// Defines a callback delegate that will be invoked whenever a retry condition is encountered. 7 | /// 8 | /// The current retry attempt count. 9 | /// The exception that caused the retry conditions to occur. 10 | /// The delay that indicates how long the current thread will be suspended before the next iteration is invoked. 11 | /// if a retry is allowed; otherwise, . 12 | public delegate bool ShouldRetry(int retryCount, Exception lastException, out TimeSpan delay); 13 | } -------------------------------------------------------------------------------- /src/Hyak.Common/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | -------------------------------------------------------------------------------- /src/Microsoft.Azure.Common/Credentials/SubscriptionCloudCredentials.cs: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) Microsoft. All rights reserved. 3 | // 4 | // Licensed under the Apache License, Version 2.0 (the "License"); 5 | // you may not use this file except in compliance with the License. 6 | // You may obtain a copy of the License at 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | // 15 | 16 | using Sandboxable.Hyak.Common; 17 | 18 | namespace Sandboxable.Microsoft.Azure 19 | { 20 | /// 21 | /// Base class for credentials associated with a particular subscription. 22 | /// 23 | public abstract class SubscriptionCloudCredentials 24 | : CloudCredentials 25 | { 26 | /// 27 | /// Gets subscription ID which uniquely identifies Microsoft Azure 28 | /// subscription. The subscription ID forms part of the URI for 29 | /// every call that you make to the Service Management API. 30 | /// 31 | public abstract string SubscriptionId { get; } 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /src/Microsoft.Azure.Common/Handlers/ClientRequestTrackingHandler.cs: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) Microsoft. All rights reserved. 3 | // 4 | // Licensed under the Apache License, Version 2.0 (the "License"); 5 | // you may not use this file except in compliance with the License. 6 | // You may obtain a copy of the License at 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | // 15 | 16 | using System.Net.Http; 17 | using System.Threading; 18 | 19 | namespace Sandboxable.Microsoft.Azure 20 | { 21 | public class ClientRequestTrackingHandler 22 | : MessageProcessingHandler 23 | { 24 | public string TrackingId { get; private set; } 25 | 26 | public ClientRequestTrackingHandler(string trackingId) 27 | : base() 28 | { 29 | TrackingId = trackingId; 30 | } 31 | 32 | protected override HttpRequestMessage ProcessRequest(HttpRequestMessage request, CancellationToken cancellationToken) 33 | { 34 | request.Headers.Add("client-tracking-id", TrackingId); 35 | return request; 36 | } 37 | 38 | protected override HttpResponseMessage ProcessResponse(HttpResponseMessage response, CancellationToken cancellationToken) 39 | { 40 | response.Headers.Add("client-tracking-id", TrackingId); 41 | return response; 42 | } 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /src/Microsoft.Azure.Common/Microsoft.Azure.Common.csproj.DotSettings: -------------------------------------------------------------------------------- 1 |  2 | True 3 | True -------------------------------------------------------------------------------- /src/Microsoft.Azure.Common/Microsoft.Azure.Common.nuspec: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | Sandboxable.Microsoft.Azure.Common 5 | 0.0.0.0 6 | Winvision 7 | This library is adjusted to run in a Partial Trust environment. Provides infrastructure for common error handling, tracing, configuration, and HTTP/REST-based pipeline manipulation. The package also exposes the CloudContext type, which enables centralized discovery of available Microsoft Azure libraries. 8 | en-US 9 | https://github.com/Winvision/Sandboxable 10 | https://github.com/Winvision/Sandboxable/blob/master/LICENSE 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /src/Microsoft.Azure.Common/Models/AzureOperationResponse.cs: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) Microsoft. All rights reserved. 3 | // 4 | // Licensed under the Apache License, Version 2.0 (the "License"); 5 | // you may not use this file except in compliance with the License. 6 | // You may obtain a copy of the License at 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | // 15 | 16 | using Sandboxable.Hyak.Common; 17 | 18 | namespace Sandboxable.Microsoft.Azure 19 | { 20 | /// 21 | /// A standard service response including an HTTP status code and request 22 | /// ID. 23 | /// 24 | public class AzureOperationResponse : HttpOperationResponse 25 | { 26 | /// 27 | /// Gets or sets the value that uniquely identifies a request 28 | /// made against the service. 29 | /// 30 | public string RequestId { get; set; } 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /src/Microsoft.Azure.Common/Models/OperationStatus.cs: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) Microsoft. All rights reserved. 3 | // 4 | // Licensed under the Apache License, Version 2.0 (the "License"); 5 | // you may not use this file except in compliance with the License. 6 | // You may obtain a copy of the License at 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | // 15 | 16 | namespace Sandboxable.Microsoft.Azure 17 | { 18 | /// 19 | /// The status of the asynchronous request. 20 | /// 21 | public enum OperationStatus 22 | { 23 | /// 24 | /// The asynchronous request is in progress. 25 | /// 26 | InProgress, 27 | 28 | /// 29 | /// The asynchronous request succeeded. 30 | /// 31 | Succeeded, 32 | 33 | /// 34 | /// The asynchronous request failed. 35 | /// 36 | Failed 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /src/Microsoft.Azure.Common/OData/FilterString.cs: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) Microsoft. All rights reserved. 3 | // 4 | // Licensed under the Apache License, Version 2.0 (the "License"); 5 | // you may not use this file except in compliance with the License. 6 | // You may obtain a copy of the License at 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | // 15 | 16 | using System; 17 | using System.Linq.Expressions; 18 | 19 | namespace Sandboxable.Microsoft.Azure.Common.OData 20 | { 21 | /// 22 | /// Handles OData filter generation. 23 | /// 24 | public class FilterString 25 | { 26 | /// 27 | /// Generates an OData filter from a specified Linq expression. 28 | /// 29 | /// Filter type 30 | /// Entity to use for filter generation 31 | /// 32 | public static string Generate(Expression> filter) 33 | { 34 | UrlExpressionVisitor visitor = new UrlExpressionVisitor(); 35 | visitor.Visit(filter); 36 | return visitor.ToString(); 37 | } 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /src/Microsoft.Azure.Common/Properties/AssemblyAdditionalInfo.cs: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) Microsoft. All rights reserved. 3 | // 4 | // Licensed under the Apache License, Version 2.0 (the "License"); 5 | // you may not use this file except in compliance with the License. 6 | // You may obtain a copy of the License at 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | // 15 | 16 | using System.Reflection; 17 | using System.Resources; 18 | 19 | [assembly: AssemblyTitle("Sandboxable Microsoft Azure Common Library")] 20 | [assembly: AssemblyDescription("Provides infrastructure for common error handling, tracing, configuration, and HTTP/REST-based pipeline manipulation. The package also exposes the CloudContext type, which enables centralized discovery of available Microsoft Azure libraries.")] 21 | 22 | [assembly: AssemblyConfiguration("")] 23 | [assembly: AssemblyCompany("Microsoft")] 24 | [assembly: AssemblyProduct("Sandboxable Azure .NET SDK")] 25 | [assembly: AssemblyCopyright("Copyright (c) Microsoft Corporation")] 26 | [assembly: AssemblyTrademark("")] 27 | [assembly: AssemblyCulture("")] 28 | [assembly: NeutralResourcesLanguage("en")] 29 | 30 | -------------------------------------------------------------------------------- /src/Microsoft.Azure.Common/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) Microsoft. All rights reserved. 3 | // 4 | // Licensed under the Apache License, Version 2.0 (the "License"); 5 | // you may not use this file except in compliance with the License. 6 | // You may obtain a copy of the License at 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | // 15 | 16 | using System.Reflection; 17 | 18 | //This file is shared with Common.NetFramework to provide consistent file version. 19 | //Do not put in extra assembly metadatas here; rather put them in AssemblyAdditionalInfo.cs. 20 | //Also merge AssemblyAdditionalInfo.cs into the file once we delete the Common.NetFramework. 21 | [assembly: AssemblyFileVersion("2.1.0.0")] 22 | [assembly: AssemblyVersion("2.0.0.0")] -------------------------------------------------------------------------------- /src/Microsoft.Azure.Common/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | -------------------------------------------------------------------------------- /src/Microsoft.Azure.KeyVault/Generated/KeyOpRequestMessageWithRawJsonContent.cs: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) Microsoft and contributors. All rights reserved. 3 | // 4 | // Licensed under the Apache License, Version 2.0 (the "License"); 5 | // you may not use this file except in compliance with the License. 6 | // You may obtain a copy of the License at 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // 13 | // See the License for the specific language governing permissions and 14 | // limitations under the License. 15 | // 16 | 17 | // Warning: This code was generated by a tool. 18 | // 19 | // Changes to this file may cause incorrect behavior and will be lost if the 20 | // code is regenerated. 21 | 22 | using System; 23 | using System.Linq; 24 | 25 | namespace Sandboxable.Microsoft.Azure.KeyVault.Internal 26 | { 27 | /// 28 | /// Represents a key operation request. 29 | /// 30 | internal partial class KeyOpRequestMessageWithRawJsonContent 31 | { 32 | private string _rawJsonRequest; 33 | 34 | /// 35 | /// Optional. 36 | /// 37 | public string RawJsonRequest 38 | { 39 | get { return this._rawJsonRequest; } 40 | set { this._rawJsonRequest = value; } 41 | } 42 | 43 | /// 44 | /// Initializes a new instance of the 45 | /// KeyOpRequestMessageWithRawJsonContent class. 46 | /// 47 | public KeyOpRequestMessageWithRawJsonContent() 48 | { 49 | } 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /src/Microsoft.Azure.KeyVault/Generated/KeyOpResponseMessageWithRawJsonContent.cs: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) Microsoft and contributors. All rights reserved. 3 | // 4 | // Licensed under the Apache License, Version 2.0 (the "License"); 5 | // you may not use this file except in compliance with the License. 6 | // You may obtain a copy of the License at 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // 13 | // See the License for the specific language governing permissions and 14 | // limitations under the License. 15 | // 16 | 17 | // Warning: This code was generated by a tool. 18 | // 19 | // Changes to this file may cause incorrect behavior and will be lost if the 20 | // code is regenerated. 21 | 22 | using System; 23 | using System.Linq; 24 | using Sandboxable.Microsoft.Azure; 25 | 26 | namespace Sandboxable.Microsoft.Azure.KeyVault.Internal 27 | { 28 | /// 29 | /// Represents the response to a key operation request. 30 | /// 31 | internal partial class KeyOpResponseMessageWithRawJsonContent : AzureOperationResponse 32 | { 33 | private string _keyOpResponse; 34 | 35 | /// 36 | /// Optional. 37 | /// 38 | public string KeyOpResponse 39 | { 40 | get { return this._keyOpResponse; } 41 | set { this._keyOpResponse = value; } 42 | } 43 | 44 | /// 45 | /// Initializes a new instance of the 46 | /// KeyOpResponseMessageWithRawJsonContent class. 47 | /// 48 | public KeyOpResponseMessageWithRawJsonContent() 49 | { 50 | } 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /src/Microsoft.Azure.KeyVault/Generated/KeyVaultInternalClientExtensions.cs: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) Microsoft and contributors. All rights reserved. 3 | // 4 | // Licensed under the Apache License, Version 2.0 (the "License"); 5 | // you may not use this file except in compliance with the License. 6 | // You may obtain a copy of the License at 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // 13 | // See the License for the specific language governing permissions and 14 | // limitations under the License. 15 | // 16 | 17 | // Warning: This code was generated by a tool. 18 | // 19 | // Changes to this file may cause incorrect behavior and will be lost if the 20 | // code is regenerated. 21 | 22 | using System; 23 | using System.Linq; 24 | 25 | namespace Sandboxable.Microsoft.Azure.KeyVault.Internal 26 | { 27 | internal static partial class KeyVaultInternalClientExtensions 28 | { 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /src/Microsoft.Azure.KeyVault/Generated/SecretRequestMessageWithRawJsonContent.cs: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) Microsoft and contributors. All rights reserved. 3 | // 4 | // Licensed under the Apache License, Version 2.0 (the "License"); 5 | // you may not use this file except in compliance with the License. 6 | // You may obtain a copy of the License at 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // 13 | // See the License for the specific language governing permissions and 14 | // limitations under the License. 15 | // 16 | 17 | // Warning: This code was generated by a tool. 18 | // 19 | // Changes to this file may cause incorrect behavior and will be lost if the 20 | // code is regenerated. 21 | 22 | using System; 23 | using System.Linq; 24 | 25 | namespace Sandboxable.Microsoft.Azure.KeyVault.Internal 26 | { 27 | /// 28 | /// Represents a secret operation request. 29 | /// 30 | internal partial class SecretRequestMessageWithRawJsonContent 31 | { 32 | private string _rawJsonRequest; 33 | 34 | /// 35 | /// Optional. 36 | /// 37 | public string RawJsonRequest 38 | { 39 | get { return this._rawJsonRequest; } 40 | set { this._rawJsonRequest = value; } 41 | } 42 | 43 | /// 44 | /// Initializes a new instance of the 45 | /// SecretRequestMessageWithRawJsonContent class. 46 | /// 47 | public SecretRequestMessageWithRawJsonContent() 48 | { 49 | } 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /src/Microsoft.Azure.KeyVault/Generated/SecretResponseMessageWithRawJsonContent.cs: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) Microsoft and contributors. All rights reserved. 3 | // 4 | // Licensed under the Apache License, Version 2.0 (the "License"); 5 | // you may not use this file except in compliance with the License. 6 | // You may obtain a copy of the License at 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // 13 | // See the License for the specific language governing permissions and 14 | // limitations under the License. 15 | // 16 | 17 | // Warning: This code was generated by a tool. 18 | // 19 | // Changes to this file may cause incorrect behavior and will be lost if the 20 | // code is regenerated. 21 | 22 | using System; 23 | using System.Linq; 24 | using Sandboxable.Microsoft.Azure; 25 | 26 | namespace Sandboxable.Microsoft.Azure.KeyVault.Internal 27 | { 28 | /// 29 | /// Represents the response to a secret operation request. 30 | /// 31 | internal partial class SecretResponseMessageWithRawJsonContent : AzureOperationResponse 32 | { 33 | private string _response; 34 | 35 | /// 36 | /// Optional. 37 | /// 38 | public string Response 39 | { 40 | get { return this._response; } 41 | set { this._response = value; } 42 | } 43 | 44 | /// 45 | /// Initializes a new instance of the 46 | /// SecretResponseMessageWithRawJsonContent class. 47 | /// 48 | public SecretResponseMessageWithRawJsonContent() 49 | { 50 | } 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /src/Microsoft.Azure.KeyVault/Microsoft.Azure.KeyVault.nuspec: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | Sandboxable.Microsoft.Azure.KeyVault 5 | 0.0.0.0 6 | Winvision 7 | This library is adjusted to run in a Partial Trust environment. Provides key and secret operation capabilities for Azure Key Vault. 8 | en-US 9 | https://github.com/Winvision/Sandboxable 10 | https://github.com/Winvision/Sandboxable/blob/master/LICENSE 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /src/Microsoft.Azure.KeyVault/Models/KeyOperationRequest.cs: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright © Microsoft Corporation, All Rights Reserved 3 | // 4 | // Licensed under the Apache License, Version 2.0 (the "License"); 5 | // you may not use this file except in compliance with the License. 6 | // You may obtain a copy of the License at 7 | // 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // THIS CODE IS PROVIDED *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS 11 | // OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION 12 | // ANY IMPLIED WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A 13 | // PARTICULAR PURPOSE, MERCHANTABILITY OR NON-INFRINGEMENT. 14 | // 15 | // See the Apache License, Version 2.0 for the specific language 16 | // governing permissions and limitations under the License. 17 | 18 | using Sandboxable.Microsoft.Azure.KeyVault.WebKey.Json; 19 | using Newtonsoft.Json; 20 | 21 | namespace Sandboxable.Microsoft.Azure.KeyVault 22 | { 23 | [JsonObject] 24 | public class KeyOperationRequest 25 | { 26 | 27 | [JsonProperty(DefaultValueHandling = DefaultValueHandling.Ignore, NullValueHandling = NullValueHandling.Ignore, PropertyName = MessagePropertyNames.Algorithm, Required = Required.Always)] 28 | public string Alg { get; set; } 29 | 30 | // Data to be encrypted. 31 | [JsonProperty(DefaultValueHandling = DefaultValueHandling.Ignore, NullValueHandling = NullValueHandling.Ignore, PropertyName = MessagePropertyNames.Value, Required = Required.Always)] 32 | [JsonConverter(typeof(Base64UrlConverter))] 33 | public byte[] Value { get; set; } 34 | 35 | public override string ToString() 36 | { 37 | return JsonConvert.SerializeObject(this); 38 | } 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /src/Microsoft.Azure.KeyVault/Models/KeyOperationResult.cs: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright © Microsoft Corporation, All Rights Reserved 3 | // 4 | // Licensed under the Apache License, Version 2.0 (the "License"); 5 | // you may not use this file except in compliance with the License. 6 | // You may obtain a copy of the License at 7 | // 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // THIS CODE IS PROVIDED *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS 11 | // OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION 12 | // ANY IMPLIED WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A 13 | // PARTICULAR PURPOSE, MERCHANTABILITY OR NON-INFRINGEMENT. 14 | // 15 | // See the Apache License, Version 2.0 for the specific language 16 | // governing permissions and limitations under the License. 17 | 18 | using Sandboxable.Microsoft.Azure.KeyVault.WebKey.Json; 19 | using Newtonsoft.Json; 20 | 21 | namespace Sandboxable.Microsoft.Azure.KeyVault 22 | { 23 | [JsonObject] 24 | public class KeyOperationResult 25 | { 26 | [JsonProperty(DefaultValueHandling = DefaultValueHandling.Ignore, NullValueHandling = NullValueHandling.Ignore, PropertyName = MessagePropertyNames.Kid, Required = Required.Always)] 27 | public string Kid { get; set; } 28 | 29 | // Encrypted data. 30 | [JsonProperty(DefaultValueHandling = DefaultValueHandling.Ignore, NullValueHandling = NullValueHandling.Ignore, PropertyName = MessagePropertyNames.Value, Required = Required.Always)] 31 | [JsonConverter(typeof(Base64UrlConverter))] 32 | public byte[] Result { get; set; } 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /src/Microsoft.Azure.KeyVault/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) Microsoft. All rights reserved. 3 | // 4 | // Licensed under the Apache License, Version 2.0 (the "License"); 5 | // you may not use this file except in compliance with the License. 6 | // You may obtain a copy of the License at 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | // 15 | 16 | using System.Reflection; 17 | using System.Resources; 18 | 19 | [assembly: AssemblyTitle( "Sandboxable Microsoft Azure Key Vault Library" )] 20 | [assembly: AssemblyDescription( "Provides key and secret operation capabilities for Azure Key Vault." )] 21 | 22 | [assembly: AssemblyVersion("1.0.0.0")] 23 | [assembly: AssemblyFileVersion("1.0.0.0")] 24 | [assembly: AssemblyConfiguration("")] 25 | [assembly: AssemblyCompany("Microsoft")] 26 | [assembly: AssemblyProduct("Sandboxable Azure .NET SDK")] 27 | [assembly: AssemblyCopyright("Copyright (c) Microsoft Corporation")] 28 | [assembly: AssemblyTrademark("")] 29 | [assembly: AssemblyCulture("")] 30 | [assembly: NeutralResourcesLanguage("en")] -------------------------------------------------------------------------------- /src/Microsoft.Azure.KeyVault/WebKey/JsonWebKeyEncryptionAlgorithms.cs: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright © Microsoft Corporation, All Rights Reserved 3 | // 4 | // Licensed under the Apache License, Version 2.0 (the "License"); 5 | // you may not use this file except in compliance with the License. 6 | // You may obtain a copy of the License at 7 | // 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // THIS CODE IS PROVIDED *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS 11 | // OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION 12 | // ANY IMPLIED WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A 13 | // PARTICULAR PURPOSE, MERCHANTABILITY OR NON-INFRINGEMENT. 14 | // 15 | // See the Apache License, Version 2.0 for the specific language 16 | // governing permissions and limitations under the License. 17 | 18 | namespace Sandboxable.Microsoft.Azure.KeyVault.WebKey 19 | { 20 | /// 21 | /// Supported JsonWebKey algorithms 22 | /// 23 | public static class JsonWebKeyEncryptionAlgorithm 24 | { 25 | public const string RSAOAEP = "RSA-OAEP"; 26 | public const string RSA15 = "RSA1_5"; 27 | 28 | /// 29 | /// All algorithms names. Use clone to avoid FxCop violation 30 | /// 31 | public static string[] AllAlgorithms 32 | { 33 | get { return (string[])_allAlgorithms.Clone(); } 34 | } 35 | 36 | private static readonly string[] _allAlgorithms = { RSA15, RSAOAEP }; 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /src/Microsoft.Azure.KeyVault/WebKey/JsonWebKeyOperations.cs: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright © Microsoft Corporation, All Rights Reserved 3 | // 4 | // Licensed under the Apache License, Version 2.0 (the "License"); 5 | // you may not use this file except in compliance with the License. 6 | // You may obtain a copy of the License at 7 | // 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // THIS CODE IS PROVIDED *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS 11 | // OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION 12 | // ANY IMPLIED WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A 13 | // PARTICULAR PURPOSE, MERCHANTABILITY OR NON-INFRINGEMENT. 14 | // 15 | // See the Apache License, Version 2.0 for the specific language 16 | // governing permissions and limitations under the License. 17 | 18 | 19 | namespace Sandboxable.Microsoft.Azure.KeyVault.WebKey 20 | { 21 | 22 | /// 23 | /// Supported JsonWebKey operations 24 | /// 25 | public static class JsonWebKeyOperation 26 | { 27 | public const string Encrypt = "encrypt"; 28 | public const string Decrypt = "decrypt"; 29 | public const string Sign = "sign"; 30 | public const string Verify = "verify"; 31 | public const string Wrap = "wrapKey"; 32 | public const string Unwrap = "unwrapKey"; 33 | 34 | /// 35 | /// All operations names. Use clone to avoid FxCop violation 36 | /// 37 | public static string[] AllOperations 38 | { 39 | get { return (string[])_allOperations.Clone(); } 40 | } 41 | 42 | private static readonly string[] _allOperations = new string[] { Encrypt, Decrypt, Sign, Verify, Wrap, Unwrap }; 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /src/Microsoft.Azure.KeyVault/WebKey/JsonWebKeySignatureAlgorithms.cs: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright © Microsoft Corporation, All Rights Reserved 3 | // 4 | // Licensed under the Apache License, Version 2.0 (the "License"); 5 | // you may not use this file except in compliance with the License. 6 | // You may obtain a copy of the License at 7 | // 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // THIS CODE IS PROVIDED *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS 11 | // OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION 12 | // ANY IMPLIED WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A 13 | // PARTICULAR PURPOSE, MERCHANTABILITY OR NON-INFRINGEMENT. 14 | // 15 | // See the Apache License, Version 2.0 for the specific language 16 | // governing permissions and limitations under the License. 17 | 18 | namespace Sandboxable.Microsoft.Azure.KeyVault.WebKey 19 | { 20 | /// 21 | /// Supported JsonWebKey algorithms 22 | /// 23 | public static class JsonWebKeySignatureAlgorithm 24 | { 25 | public const string RS256 = "RS256"; 26 | public const string RS384 = "RS384"; 27 | public const string RS512 = "RS512"; 28 | public const string RSNULL = "RSNULL"; 29 | 30 | /// 31 | /// All algorithms names. Use clone to avoid FxCop violation 32 | /// 33 | public static string[] AllAlgorithms 34 | { 35 | get { return (string[])_allAlgorithms.Clone(); } 36 | } 37 | 38 | private static readonly string[] _allAlgorithms = { RS256, RS384, RS512, RSNULL }; 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /src/Microsoft.Azure.KeyVault/WebKey/JsonWebKeyTypes.cs: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright © Microsoft Corporation, All Rights Reserved 3 | // 4 | // Licensed under the Apache License, Version 2.0 (the "License"); 5 | // you may not use this file except in compliance with the License. 6 | // You may obtain a copy of the License at 7 | // 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // THIS CODE IS PROVIDED *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS 11 | // OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION 12 | // ANY IMPLIED WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A 13 | // PARTICULAR PURPOSE, MERCHANTABILITY OR NON-INFRINGEMENT. 14 | // 15 | // See the Apache License, Version 2.0 for the specific language 16 | // governing permissions and limitations under the License. 17 | 18 | 19 | namespace Sandboxable.Microsoft.Azure.KeyVault.WebKey 20 | { 21 | /// 22 | /// Supported JsonWebKey key types (kty) 23 | /// 24 | public static class JsonWebKeyType 25 | { 26 | public const string EllipticCurve = "EC"; 27 | public const string Rsa = "RSA"; 28 | public const string RsaHsm = "RSA-HSM"; 29 | public const string Octet = "oct"; 30 | 31 | /// 32 | /// All types names. Use clone to avoid FxCop violation 33 | /// 34 | public static string[] AllTypes 35 | { 36 | get { return (string[])_allTypes.Clone(); } 37 | } 38 | 39 | private static readonly string[] _allTypes = { EllipticCurve, Rsa, RsaHsm, Octet }; 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /src/Microsoft.Azure.KeyVault/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | -------------------------------------------------------------------------------- /src/Microsoft.Azure.Management.KeyVault/Generated/Sku.cs: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) Microsoft and contributors. All rights reserved. 3 | // 4 | // Licensed under the Apache License, Version 2.0 (the "License"); 5 | // you may not use this file except in compliance with the License. 6 | // You may obtain a copy of the License at 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // 13 | // See the License for the specific language governing permissions and 14 | // limitations under the License. 15 | // 16 | 17 | // Warning: This code was generated by a tool. 18 | // 19 | // Changes to this file may cause incorrect behavior and will be lost if the 20 | // code is regenerated. 21 | 22 | using System; 23 | 24 | namespace Sandboxable.Microsoft.Azure.Management.KeyVault 25 | { 26 | public class Sku 27 | { 28 | /// 29 | /// Optional. SKU family name 30 | /// 31 | public string Family { get; set; } 32 | 33 | /// 34 | /// Optional. SKU name 35 | /// 36 | public string Name { get; set; } 37 | } 38 | } 39 | 40 | -------------------------------------------------------------------------------- /src/Microsoft.Azure.Management.KeyVault/Generated/Vault.cs: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) Microsoft and contributors. All rights reserved. 3 | // 4 | // Licensed under the Apache License, Version 2.0 (the "License"); 5 | // you may not use this file except in compliance with the License. 6 | // You may obtain a copy of the License at 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // 13 | // See the License for the specific language governing permissions and 14 | // limitations under the License. 15 | // 16 | 17 | // Warning: This code was generated by a tool. 18 | // 19 | // Changes to this file may cause incorrect behavior and will be lost if the 20 | // code is regenerated. 21 | 22 | using System; 23 | 24 | namespace Sandboxable.Microsoft.Azure.Management.KeyVault 25 | { 26 | /// 27 | /// Resource information with extended details. 28 | /// 29 | public class Vault : ResourceBaseExtended 30 | { 31 | /// 32 | /// Optional. Properties of the vault 33 | /// 34 | public VaultProperties Properties { get; set; } 35 | 36 | /// 37 | /// Initializes a new instance of the Vault class. 38 | /// 39 | public Vault() 40 | { 41 | } 42 | 43 | /// 44 | /// Initializes a new instance of the Vault class with required 45 | /// arguments. 46 | /// 47 | public Vault(string location) 48 | : this() 49 | { 50 | if (location == null) 51 | { 52 | throw new ArgumentNullException(nameof(location)); 53 | } 54 | 55 | this.Location = location; 56 | } 57 | } 58 | } 59 | 60 | -------------------------------------------------------------------------------- /src/Microsoft.Azure.Management.KeyVault/Generated/VaultGetResponse.cs: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) Microsoft and contributors. All rights reserved. 3 | // 4 | // Licensed under the Apache License, Version 2.0 (the "License"); 5 | // you may not use this file except in compliance with the License. 6 | // You may obtain a copy of the License at 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // 13 | // See the License for the specific language governing permissions and 14 | // limitations under the License. 15 | // 16 | 17 | // Warning: This code was generated by a tool. 18 | // 19 | // Changes to this file may cause incorrect behavior and will be lost if the 20 | // code is regenerated. 21 | 22 | using System; 23 | 24 | namespace Sandboxable.Microsoft.Azure.Management.KeyVault 25 | { 26 | /// 27 | /// Vault information. 28 | /// 29 | public class VaultGetResponse : AzureOperationResponse 30 | { 31 | /// 32 | /// Optional. Gets or sets the vault. 33 | /// 34 | public Vault Vault { get; set; } 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /src/Microsoft.Azure.Management.KeyVault/Generated/VaultListResponse.cs: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) Microsoft and contributors. All rights reserved. 3 | // 4 | // Licensed under the Apache License, Version 2.0 (the "License"); 5 | // you may not use this file except in compliance with the License. 6 | // You may obtain a copy of the License at 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // 13 | // See the License for the specific language governing permissions and 14 | // limitations under the License. 15 | // 16 | 17 | // Warning: This code was generated by a tool. 18 | // 19 | // Changes to this file may cause incorrect behavior and will be lost if the 20 | // code is regenerated. 21 | 22 | using System; 23 | using System.Collections.Generic; 24 | using Sandboxable.Hyak.Common; 25 | 26 | namespace Sandboxable.Microsoft.Azure.Management.KeyVault 27 | { 28 | /// 29 | /// List of vaults 30 | /// 31 | public class VaultListResponse : AzureOperationResponse 32 | { 33 | /// 34 | /// Optional. Gets or sets the URL to get the next set of vaults. 35 | /// 36 | public string NextLink { get; set; } 37 | 38 | /// 39 | /// Optional. Gets or sets the list of vaults. 40 | /// 41 | public IList Vaults { get; set; } 42 | 43 | /// 44 | /// Initializes a new instance of the VaultListResponse class. 45 | /// 46 | public VaultListResponse() 47 | { 48 | this.Vaults = new LazyList(); 49 | } 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /src/Microsoft.Azure.Management.KeyVault/Microsoft.Azure.Management.KeyVault.csproj.DotSettings: -------------------------------------------------------------------------------- 1 |  2 | True -------------------------------------------------------------------------------- /src/Microsoft.Azure.Management.KeyVault/Microsoft.Azure.Management.KeyVault.nuspec: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | Sandboxable.Microsoft.Azure.Management.KeyVault 5 | 0.0.0.0 6 | Winvision 7 | This library is adjusted to run in a Partial Trust environment. Provides Microsoft Azure Key Vault management functions for managing key vaults. 8 | en-US 9 | https://github.com/Winvision/Sandboxable 10 | https://github.com/Winvision/Sandboxable/blob/master/LICENSE 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /src/Microsoft.Azure.Management.KeyVault/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) Microsoft. All rights reserved. 3 | // 4 | // Licensed under the Apache License, Version 2.0 (the "License"); 5 | // you may not use this file except in compliance with the License. 6 | // You may obtain a copy of the License at 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | // 15 | 16 | using System.Reflection; 17 | using System.Resources; 18 | 19 | [assembly: AssemblyTitle("Sandboxable Microsoft Azure Key Vault Management Library")] 20 | [assembly: AssemblyDescription("Provides Microsoft Azure Key Vault management functions for managing key vaults.")] 21 | 22 | [assembly: AssemblyVersion("1.0.0.0")] 23 | [assembly: AssemblyFileVersion("1.0.2.0")] 24 | 25 | [assembly: AssemblyConfiguration("")] 26 | [assembly: AssemblyCompany("Microsoft")] 27 | [assembly: AssemblyProduct("Sandboxable Microsoft Azure .NET SDK")] 28 | [assembly: AssemblyCopyright("Copyright (c) Microsoft Corporation")] 29 | [assembly: AssemblyTrademark("")] 30 | [assembly: AssemblyCulture("")] 31 | [assembly: NeutralResourcesLanguage("en")] 32 | 33 | -------------------------------------------------------------------------------- /src/Microsoft.Azure.Management.KeyVault/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | -------------------------------------------------------------------------------- /src/Microsoft.IdentityModel.Clients.ActiveDirectory/ADAL.Common/CommonAssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | //---------------------------------------------------------------------- 2 | // Copyright (c) Microsoft Open Technologies, Inc. 3 | // All Rights Reserved 4 | // Apache License 2.0 5 | // 6 | // Licensed under the Apache License, Version 2.0 (the "License"); 7 | // you may not use this file except in compliance with the License. 8 | // You may obtain a copy of the License at 9 | // 10 | // http://www.apache.org/licenses/LICENSE-2.0 11 | // 12 | // Unless required by applicable law or agreed to in writing, software 13 | // distributed under the License is distributed on an "AS IS" BASIS, 14 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | // See the License for the specific language governing permissions and 16 | // limitations under the License. 17 | //---------------------------------------------------------------------- 18 | 19 | using System; 20 | using System.Reflection; 21 | 22 | [assembly: AssemblyProduct("Sandboxable Active Directory Authentication Library")] 23 | [assembly: AssemblyDescription("")] 24 | [assembly: AssemblyConfiguration("")] 25 | [assembly: AssemblyCulture("")] 26 | [assembly: AssemblyCompany("Microsoft Open Technologies")] 27 | [assembly: AssemblyCopyright("Copyright (c) Microsoft Open Technologies. All rights reserved.")] 28 | [assembly: AssemblyTrademark("")] 29 | 30 | [assembly: AssemblyVersion("2.24.0.0")] 31 | 32 | // Keep major and minor versions in AssemblyFileVersion in sync with AssemblyVersion. 33 | // Build and revision numbers are replaced on build machine for official builds. 34 | [assembly: AssemblyFileVersion("2.24.00000.0000")] 35 | // On official build, attribute AssemblyInformationalVersionAttribute is added as well 36 | // with its value equal to the hash of the last commit to the git branch. 37 | // e.g.: [assembly: AssemblyInformationalVersionAttribute("4392c9835a38c27516fc0cd7bad7bccdcaeab161")] 38 | 39 | // Assembly marked as compliant. 40 | [assembly: CLSCompliant(true)] -------------------------------------------------------------------------------- /src/Microsoft.IdentityModel.Clients.ActiveDirectory/ADAL.Common/DateTimeHelper.cs: -------------------------------------------------------------------------------- 1 | //---------------------------------------------------------------------- 2 | // Copyright (c) Microsoft Open Technologies, Inc. 3 | // All Rights Reserved 4 | // Apache License 2.0 5 | // 6 | // Licensed under the Apache License, Version 2.0 (the "License"); 7 | // you may not use this file except in compliance with the License. 8 | // You may obtain a copy of the License at 9 | // 10 | // http://www.apache.org/licenses/LICENSE-2.0 11 | // 12 | // Unless required by applicable law or agreed to in writing, software 13 | // distributed under the License is distributed on an "AS IS" BASIS, 14 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | // See the License for the specific language governing permissions and 16 | // limitations under the License. 17 | //---------------------------------------------------------------------- 18 | 19 | using System; 20 | using System.Globalization; 21 | 22 | namespace Sandboxable.Microsoft.IdentityModel.Clients.ActiveDirectory 23 | { 24 | internal static class DateTimeHelper 25 | { 26 | public static long ConvertToTimeT(DateTime time) 27 | { 28 | var startTime = new DateTime(1970, 1, 1, 0, 0, 0, 0); 29 | var diff = time - startTime; 30 | 31 | return (long)diff.TotalSeconds; 32 | } 33 | 34 | public static DateTime ConvertFromTimeT(long seconds) 35 | { 36 | var startTime = new DateTime(1970, 1, 1, 0, 0, 0, 0); 37 | 38 | return DateTime.SpecifyKind(startTime.AddSeconds(seconds), DateTimeKind.Utc); 39 | } 40 | 41 | public static string BuildTimeString(DateTime utcTime) 42 | { 43 | return utcTime.ToString("yyyy-MM-ddTHH:mm:ss.068Z", CultureInfo.InvariantCulture); 44 | } 45 | } 46 | } -------------------------------------------------------------------------------- /src/Microsoft.IdentityModel.Clients.ActiveDirectory/ADAL.NET/CryptographyHelper.cs: -------------------------------------------------------------------------------- 1 | //---------------------------------------------------------------------- 2 | // Copyright (c) Microsoft Open Technologies, Inc. 3 | // All Rights Reserved 4 | // Apache License 2.0 5 | // 6 | // Licensed under the Apache License, Version 2.0 (the "License"); 7 | // you may not use this file except in compliance with the License. 8 | // You may obtain a copy of the License at 9 | // 10 | // http://www.apache.org/licenses/LICENSE-2.0 11 | // 12 | // Unless required by applicable law or agreed to in writing, software 13 | // distributed under the License is distributed on an "AS IS" BASIS, 14 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | // See the License for the specific language governing permissions and 16 | // limitations under the License. 17 | //---------------------------------------------------------------------- 18 | 19 | using System; 20 | using System.Text; 21 | using Org.BouncyCastle.Pkcs; 22 | 23 | namespace Sandboxable.Microsoft.IdentityModel.Clients.ActiveDirectory 24 | { 25 | internal static class CryptographyHelper 26 | { 27 | public static byte[] SignWithCertificate(string message, Pkcs12Store x509Certificate) 28 | { 29 | return x509Certificate.PrivateKey().SignData(Encoding.UTF8.GetBytes(message)); 30 | } 31 | } 32 | } -------------------------------------------------------------------------------- /src/Microsoft.IdentityModel.Clients.ActiveDirectory/Microsoft.IdentityModel.Clients.ActiveDirectory.csproj.DotSettings: -------------------------------------------------------------------------------- 1 |  2 | True 3 | True -------------------------------------------------------------------------------- /src/Microsoft.IdentityModel.Clients.ActiveDirectory/Microsoft.IdentityModel.Clients.ActiveDirectory.nuspec: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | Sandboxable.Microsoft.IdentityModel.Clients.ActiveDirectory 5 | 0.0.0.0 6 | Winvision 7 | This library is adjusted to run in a Partial Trust environment. This package contains the binaries of the Active Directory Authentication Library (ADAL). ADAL provides easy to use authentication functionality for your .NET client and Windows Store apps by taking advantage of Windows Server Active Directory and Windows Azure Active Directory. 8 | en-US 9 | https://github.com/Winvision/Sandboxable 10 | https://github.com/Winvision/Sandboxable/blob/master/LICENSE 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /src/Microsoft.IdentityModel.Clients.ActiveDirectory/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | //---------------------------------------------------------------------- 2 | // Copyright (c) Microsoft Open Technologies, Inc. 3 | // All Rights Reserved 4 | // Apache License 2.0 5 | // 6 | // Licensed under the Apache License, Version 2.0 (the "License"); 7 | // you may not use this file except in compliance with the License. 8 | // You may obtain a copy of the License at 9 | // 10 | // http://www.apache.org/licenses/LICENSE-2.0 11 | // 12 | // Unless required by applicable law or agreed to in writing, software 13 | // distributed under the License is distributed on an "AS IS" BASIS, 14 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | // See the License for the specific language governing permissions and 16 | // limitations under the License. 17 | //---------------------------------------------------------------------- 18 | 19 | using System.Reflection; 20 | using System.Runtime.InteropServices; 21 | 22 | [assembly: AssemblyTitle("Sandboxable.Microsoft.IdentityModel.Clients.ActiveDirectory")] 23 | 24 | // Setting ComVisible to false makes the types in this assembly not visible 25 | // to COM components. If you need to access a type in this assembly from 26 | // COM, set the ComVisible attribute to true on that type. 27 | [assembly: ComVisible(false)] 28 | 29 | // The following GUID is for the ID of the typelib if this project is exposed to COM 30 | [assembly: Guid("ff47962a-d498-4c63-b7e9-4db3653ad7da")] 31 | 32 | // Assembly version information is in file ADAL.Common\CommonAssemblyInfo.cs 33 | -------------------------------------------------------------------------------- /src/Microsoft.IdentityModel.Clients.ActiveDirectory/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | -------------------------------------------------------------------------------- /src/Microsoft.WindowsAzure.Storage/Auth/Protocol/IAuthenticationHandler.cs: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------- 2 | // 3 | // Copyright 2013 Microsoft Corporation 4 | // 5 | // Licensed under the Apache License, Version 2.0 (the "License"); 6 | // you may not use this file except in compliance with the License. 7 | // You may obtain a copy of the License at 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // See the License for the specific language governing permissions and 14 | // limitations under the License. 15 | // 16 | //----------------------------------------------------------------------- 17 | 18 | namespace Sandboxable.Microsoft.WindowsAzure.Storage.Auth.Protocol 19 | { 20 | using System.Net; 21 | 22 | /// 23 | /// Represents a handler that signs HTTP requests. 24 | /// 25 | public interface IAuthenticationHandler 26 | { 27 | /// 28 | /// Signs the specified HTTP request so it can be authenticated by the Microsoft Azure storage services. 29 | /// 30 | /// The HTTP request to sign. 31 | /// An object that represents the context for the current operation. 32 | void SignRequest(HttpWebRequest request, OperationContext operationContext); 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /src/Microsoft.WindowsAzure.Storage/Auth/Protocol/NoOpAuthenticationHandler.cs: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------- 2 | // 3 | // Copyright 2013 Microsoft Corporation 4 | // 5 | // Licensed under the Apache License, Version 2.0 (the "License"); 6 | // you may not use this file except in compliance with the License. 7 | // You may obtain a copy of the License at 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // See the License for the specific language governing permissions and 14 | // limitations under the License. 15 | // 16 | //----------------------------------------------------------------------- 17 | 18 | namespace Sandboxable.Microsoft.WindowsAzure.Storage.Auth.Protocol 19 | { 20 | using System.Net; 21 | 22 | /// 23 | /// Represents a handler that signs HTTP requests with no authentication information. 24 | /// 25 | public sealed class NoOpAuthenticationHandler : IAuthenticationHandler 26 | { 27 | /// 28 | /// Initializes a new instance of the class. 29 | /// 30 | public NoOpAuthenticationHandler() 31 | { 32 | } 33 | 34 | /// 35 | /// Signs the specified HTTP request with no authentication information. 36 | /// 37 | /// The HTTP request to sign. 38 | /// An object that represents the context for the current operation. 39 | public void SignRequest(HttpWebRequest request, OperationContext operationContext) 40 | { 41 | // no op 42 | } 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /src/Microsoft.WindowsAzure.Storage/Auth/StorageAccountKey.cs: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------- 2 | // 3 | // Copyright 2013 Microsoft Corporation 4 | // 5 | // Licensed under the Apache License, Version 2.0 (the "License"); 6 | // you may not use this file except in compliance with the License. 7 | // You may obtain a copy of the License at 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // See the License for the specific language governing permissions and 14 | // limitations under the License. 15 | // 16 | //----------------------------------------------------------------------- 17 | 18 | namespace Sandboxable.Microsoft.WindowsAzure.Storage.Auth 19 | { 20 | internal struct StorageAccountKey 21 | { 22 | internal string KeyName; 23 | internal byte[] KeyValue; 24 | 25 | public StorageAccountKey(string keyName, byte[] keyValue) 26 | { 27 | this.KeyName = keyName; 28 | this.KeyValue = keyValue; 29 | } 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /src/Microsoft.WindowsAzure.Storage/AuthenticationScheme.cs: -------------------------------------------------------------------------------- 1 | // ----------------------------------------------------------------------------------------- 2 | // 3 | // Copyright 2013 Microsoft Corporation 4 | // 5 | // Licensed under the Apache License, Version 2.0 (the "License"); 6 | // you may not use this file except in compliance with the License. 7 | // You may obtain a copy of the License at 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // See the License for the specific language governing permissions and 14 | // limitations under the License. 15 | // 16 | // ----------------------------------------------------------------------------------------- 17 | 18 | namespace Sandboxable.Microsoft.WindowsAzure.Storage 19 | { 20 | /// 21 | /// Specifies the authentication scheme used to sign HTTP requests. 22 | /// 23 | public enum AuthenticationScheme 24 | { 25 | /// 26 | /// Signs HTTP requests using the Shared Key Lite authentication scheme. 27 | /// 28 | SharedKeyLite, 29 | 30 | /// 31 | /// Signs HTTP requests using the Shared Key authentication scheme. 32 | /// 33 | SharedKey 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /src/Microsoft.WindowsAzure.Storage/Blob/BlobContainerPublicAccessType.cs: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------- 2 | // 3 | // Copyright 2013 Microsoft Corporation 4 | // 5 | // Licensed under the Apache License, Version 2.0 (the "License"); 6 | // you may not use this file except in compliance with the License. 7 | // You may obtain a copy of the License at 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // See the License for the specific language governing permissions and 14 | // limitations under the License. 15 | // 16 | //----------------------------------------------------------------------- 17 | 18 | namespace Sandboxable.Microsoft.WindowsAzure.Storage.Blob 19 | { 20 | /// 21 | /// Specifies the level of public access that is allowed on the container. 22 | /// 23 | public enum BlobContainerPublicAccessType 24 | { 25 | /// 26 | /// No public access. Only the account owner can read resources in this container. 27 | /// 28 | Off, 29 | 30 | /// 31 | /// Container-level public access. Anonymous clients can read container and blob data. 32 | /// 33 | Container, 34 | 35 | /// 36 | /// Blob-level public access. Anonymous clients can read blob data within this container, but not container data. 37 | /// 38 | Blob, 39 | 40 | /// 41 | /// Unknown access type. 42 | /// 43 | Unknown 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /src/Microsoft.WindowsAzure.Storage/Blob/BlobEncryptionData.cs: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright 2013 Microsoft Corporation 3 | // 4 | // Licensed under the Apache License, Version 2.0 (the "License"); 5 | // you may not use this file except in compliance with the License. 6 | // You may obtain a copy of the License at 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | // 15 | // ----------------------------------------------------------------------------------------- 16 | 17 | namespace Sandboxable.Microsoft.WindowsAzure.Storage.Blob 18 | { 19 | /// 20 | /// Represents the blob encryption data that is stored as metadata on the service. 21 | /// 22 | internal sealed class BlobEncryptionData : EncryptionData 23 | { 24 | /// 25 | /// Gets or sets the blob client encryption mode. 26 | /// 27 | /// The blob encryption mode. 28 | public string EncryptionMode { get; set; } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /src/Microsoft.WindowsAzure.Storage/Blob/BlobEncryptionMode.cs: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------- 2 | // 3 | // Copyright 2013 Microsoft Corporation 4 | // 5 | // Licensed under the Apache License, Version 2.0 (the "License"); 6 | // you may not use this file except in compliance with the License. 7 | // You may obtain a copy of the License at 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // See the License for the specific language governing permissions and 14 | // limitations under the License. 15 | // 16 | //----------------------------------------------------------------------- 17 | 18 | namespace Sandboxable.Microsoft.WindowsAzure.Storage.Blob 19 | { 20 | using System; 21 | 22 | /// 23 | /// Specifies the blob encryption mode. 24 | /// 25 | internal enum BlobEncryptionMode 26 | { 27 | /// 28 | /// No encryption. 29 | /// 30 | None, 31 | 32 | /// 33 | /// Use Blob level encryption mechanism. 34 | /// 35 | FullBlob 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /src/Microsoft.WindowsAzure.Storage/Blob/BlobType.cs: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------- 2 | // 3 | // Copyright 2013 Microsoft Corporation 4 | // 5 | // Licensed under the Apache License, Version 2.0 (the "License"); 6 | // you may not use this file except in compliance with the License. 7 | // You may obtain a copy of the License at 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // See the License for the specific language governing permissions and 14 | // limitations under the License. 15 | // 16 | //----------------------------------------------------------------------- 17 | 18 | namespace Sandboxable.Microsoft.WindowsAzure.Storage.Blob 19 | { 20 | /// 21 | /// The type of a blob. 22 | /// 23 | public enum BlobType 24 | { 25 | /// 26 | /// Not specified. 27 | /// 28 | Unspecified, 29 | 30 | /// 31 | /// A page blob. 32 | /// 33 | PageBlob, 34 | 35 | /// 36 | /// A block blob. 37 | /// 38 | BlockBlob, 39 | 40 | /// 41 | /// An append blob. 42 | /// 43 | AppendBlob 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /src/Microsoft.WindowsAzure.Storage/Blob/BlockListingFilter.cs: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------- 2 | // 3 | // Copyright 2013 Microsoft Corporation 4 | // 5 | // Licensed under the Apache License, Version 2.0 (the "License"); 6 | // you may not use this file except in compliance with the License. 7 | // You may obtain a copy of the License at 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // See the License for the specific language governing permissions and 14 | // limitations under the License. 15 | // 16 | //----------------------------------------------------------------------- 17 | 18 | namespace Sandboxable.Microsoft.WindowsAzure.Storage.Blob 19 | { 20 | /// 21 | /// Indicates whether to list only committed blocks, only uncommitted blocks, or all blocks. 22 | /// 23 | public enum BlockListingFilter 24 | { 25 | /// 26 | /// Committed blocks. 27 | /// 28 | Committed, 29 | 30 | /// 31 | /// Uncommitted blocks. 32 | /// 33 | Uncommitted, 34 | 35 | /// 36 | /// Both committed and uncommitted blocks. 37 | /// 38 | All 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /src/Microsoft.WindowsAzure.Storage/Blob/BlockSearchMode.cs: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------- 2 | // 3 | // Copyright 2013 Microsoft Corporation 4 | // 5 | // Licensed under the Apache License, Version 2.0 (the "License"); 6 | // you may not use this file except in compliance with the License. 7 | // You may obtain a copy of the License at 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // See the License for the specific language governing permissions and 14 | // limitations under the License. 15 | // 16 | //----------------------------------------------------------------------- 17 | 18 | namespace Sandboxable.Microsoft.WindowsAzure.Storage.Blob 19 | { 20 | /// 21 | /// Indicates which block lists should be searched to find a specified block. 22 | /// 23 | public enum BlockSearchMode 24 | { 25 | /// 26 | /// Search the committed block list only. 27 | /// 28 | Committed, 29 | 30 | /// 31 | /// Search the uncommitted block list only. 32 | /// 33 | Uncommitted, 34 | 35 | /// 36 | /// Search the uncommitted block list first, and if the block is not found there, search 37 | /// the committed block list. 38 | /// 39 | Latest 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /src/Microsoft.WindowsAzure.Storage/Blob/ContainerListingDetails.cs: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------- 2 | // 3 | // Copyright 2013 Microsoft Corporation 4 | // 5 | // Licensed under the Apache License, Version 2.0 (the "License"); 6 | // you may not use this file except in compliance with the License. 7 | // You may obtain a copy of the License at 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // See the License for the specific language governing permissions and 14 | // limitations under the License. 15 | // 16 | //----------------------------------------------------------------------- 17 | 18 | namespace Sandboxable.Microsoft.WindowsAzure.Storage.Blob 19 | { 20 | using System; 21 | 22 | /// 23 | /// Specifies which details to include when listing the containers in this storage account. 24 | /// 25 | [Flags] 26 | public enum ContainerListingDetails 27 | { 28 | /// 29 | /// No additional details. 30 | /// 31 | None = 0x0, 32 | 33 | /// 34 | /// Retrieve container metadata. 35 | /// 36 | Metadata = 0x1, 37 | 38 | /// 39 | /// Retrieve all available details. 40 | /// 41 | All = 0x1 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /src/Microsoft.WindowsAzure.Storage/Blob/CopyStatus.cs: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------- 2 | // 3 | // Copyright 2013 Microsoft Corporation 4 | // 5 | // Licensed under the Apache License, Version 2.0 (the "License"); 6 | // you may not use this file except in compliance with the License. 7 | // You may obtain a copy of the License at 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // See the License for the specific language governing permissions and 14 | // limitations under the License. 15 | // 16 | //----------------------------------------------------------------------- 17 | 18 | namespace Sandboxable.Microsoft.WindowsAzure.Storage.Blob 19 | { 20 | /// 21 | /// Represents the status of a copy blob operation. 22 | /// 23 | public enum CopyStatus 24 | { 25 | /// 26 | /// The copy status is invalid. 27 | /// 28 | Invalid, 29 | 30 | /// 31 | /// The copy operation is pending. 32 | /// 33 | Pending, 34 | 35 | /// 36 | /// The copy operation succeeded. 37 | /// 38 | Success, 39 | 40 | /// 41 | /// The copy operation has been aborted. 42 | /// 43 | Aborted, 44 | 45 | /// 46 | /// The copy operation encountered an error. 47 | /// 48 | Failed 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /src/Microsoft.WindowsAzure.Storage/Blob/DeleteSnapshotsOption.cs: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------- 2 | // 3 | // Copyright 2013 Microsoft Corporation 4 | // 5 | // Licensed under the Apache License, Version 2.0 (the "License"); 6 | // you may not use this file except in compliance with the License. 7 | // You may obtain a copy of the License at 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // See the License for the specific language governing permissions and 14 | // limitations under the License. 15 | // 16 | //----------------------------------------------------------------------- 17 | 18 | namespace Sandboxable.Microsoft.WindowsAzure.Storage.Blob 19 | { 20 | /// 21 | /// The set of options describing delete operation. 22 | /// 23 | public enum DeleteSnapshotsOption 24 | { 25 | /// 26 | /// Delete the blob only. If the blob has snapshots, this option will result in an error from the service. 27 | /// 28 | None, 29 | 30 | /// 31 | /// Delete the blob and its snapshots. 32 | /// 33 | IncludeSnapshots, 34 | 35 | /// 36 | /// Delete the blob's snapshots only. 37 | /// 38 | DeleteSnapshotsOnly 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /src/Microsoft.WindowsAzure.Storage/Blob/LeaseAction.cs: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------- 2 | // 3 | // Copyright 2013 Microsoft Corporation 4 | // 5 | // Licensed under the Apache License, Version 2.0 (the "License"); 6 | // you may not use this file except in compliance with the License. 7 | // You may obtain a copy of the License at 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // See the License for the specific language governing permissions and 14 | // limitations under the License. 15 | // 16 | //----------------------------------------------------------------------- 17 | 18 | namespace Sandboxable.Microsoft.WindowsAzure.Storage.Blob 19 | { 20 | /// 21 | /// Describes actions that can be performed on a lease. 22 | /// 23 | public enum LeaseAction 24 | { 25 | /// 26 | /// Acquire the lease. 27 | /// 28 | Acquire, 29 | 30 | /// 31 | /// Renew the lease. 32 | /// 33 | Renew, 34 | 35 | /// 36 | /// Release the lease. 37 | /// 38 | Release, 39 | 40 | /// 41 | /// Break the lease. 42 | /// 43 | Break, 44 | 45 | /// 46 | /// Change the lease ID. 47 | /// 48 | Change, 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /src/Microsoft.WindowsAzure.Storage/Blob/LeaseDuration.cs: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------- 2 | // 3 | // Copyright 2013 Microsoft Corporation 4 | // 5 | // Licensed under the Apache License, Version 2.0 (the "License"); 6 | // you may not use this file except in compliance with the License. 7 | // You may obtain a copy of the License at 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // See the License for the specific language governing permissions and 14 | // limitations under the License. 15 | // 16 | //----------------------------------------------------------------------- 17 | 18 | namespace Sandboxable.Microsoft.WindowsAzure.Storage.Blob 19 | { 20 | /// 21 | /// The lease duration of a resource. 22 | /// 23 | public enum LeaseDuration 24 | { 25 | /// 26 | /// The lease duration is not specified. 27 | /// 28 | Unspecified, 29 | 30 | /// 31 | /// The lease duration is finite. 32 | /// 33 | Fixed, 34 | 35 | /// 36 | /// The lease duration is infinite. 37 | /// 38 | Infinite 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /src/Microsoft.WindowsAzure.Storage/Blob/LeaseState.cs: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------- 2 | // 3 | // Copyright 2013 Microsoft Corporation 4 | // 5 | // Licensed under the Apache License, Version 2.0 (the "License"); 6 | // you may not use this file except in compliance with the License. 7 | // You may obtain a copy of the License at 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // See the License for the specific language governing permissions and 14 | // limitations under the License. 15 | // 16 | //----------------------------------------------------------------------- 17 | 18 | namespace Sandboxable.Microsoft.WindowsAzure.Storage.Blob 19 | { 20 | /// 21 | /// The lease state of a resource. 22 | /// 23 | public enum LeaseState 24 | { 25 | /// 26 | /// The lease state is not specified. 27 | /// 28 | Unspecified, 29 | 30 | /// 31 | /// The lease is in the Available state. 32 | /// 33 | Available, 34 | 35 | /// 36 | /// The lease is in the Leased state. 37 | /// 38 | Leased, 39 | 40 | /// 41 | /// The lease is in the Expired state. 42 | /// 43 | Expired, 44 | 45 | /// 46 | /// The lease is in the Breaking state. 47 | /// 48 | Breaking, 49 | 50 | /// 51 | /// The lease is in the Broken state. 52 | /// 53 | Broken, 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /src/Microsoft.WindowsAzure.Storage/Blob/LeaseStatus.cs: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------- 2 | // 3 | // Copyright 2013 Microsoft Corporation 4 | // 5 | // Licensed under the Apache License, Version 2.0 (the "License"); 6 | // you may not use this file except in compliance with the License. 7 | // You may obtain a copy of the License at 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // See the License for the specific language governing permissions and 14 | // limitations under the License. 15 | // 16 | //----------------------------------------------------------------------- 17 | 18 | namespace Sandboxable.Microsoft.WindowsAzure.Storage.Blob 19 | { 20 | /// 21 | /// The lease status of a resource. 22 | /// 23 | public enum LeaseStatus 24 | { 25 | /// 26 | /// The lease status is not specified. 27 | /// 28 | Unspecified, 29 | 30 | /// 31 | /// The resource is locked. 32 | /// 33 | Locked, 34 | 35 | /// 36 | /// The resource is available to be locked. 37 | /// 38 | Unlocked 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /src/Microsoft.WindowsAzure.Storage/Blob/ListBlockItem.cs: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------- 2 | // 3 | // Copyright 2013 Microsoft Corporation 4 | // 5 | // Licensed under the Apache License, Version 2.0 (the "License"); 6 | // you may not use this file except in compliance with the License. 7 | // You may obtain a copy of the License at 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // See the License for the specific language governing permissions and 14 | // limitations under the License. 15 | // 16 | //----------------------------------------------------------------------- 17 | 18 | namespace Sandboxable.Microsoft.WindowsAzure.Storage.Blob 19 | { 20 | /// 21 | /// Represents a block retrieved from the blob's block list. 22 | /// 23 | public sealed class ListBlockItem 24 | { 25 | /// 26 | /// Gets the name of the block. 27 | /// 28 | /// The block name. 29 | public string Name { get; internal set; } 30 | 31 | /// 32 | /// Gets the size of block in bytes. 33 | /// 34 | /// The block size. 35 | public long Length { get; internal set; } 36 | 37 | /// 38 | /// Gets a value indicating whether or not the block has been committed. 39 | /// 40 | /// true if the block has been committed; otherwise, false. 41 | public bool Committed { get; internal set; } 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /src/Microsoft.WindowsAzure.Storage/Blob/Protocol/IListBlobEntry.cs: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------- 2 | // 3 | // Copyright 2013 Microsoft Corporation 4 | // 5 | // Licensed under the Apache License, Version 2.0 (the "License"); 6 | // you may not use this file except in compliance with the License. 7 | // You may obtain a copy of the License at 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // See the License for the specific language governing permissions and 14 | // limitations under the License. 15 | // 16 | //----------------------------------------------------------------------- 17 | 18 | namespace Sandboxable.Microsoft.WindowsAzure.Storage.Blob.Protocol 19 | { 20 | /// 21 | /// Represents an item that may be returned by a blob listing operation. 22 | /// 23 | #if WINDOWS_RT 24 | internal 25 | #else 26 | public 27 | #endif 28 | interface IListBlobEntry 29 | { 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /src/Microsoft.WindowsAzure.Storage/Blob/Protocol/ListBlobPrefixEntry.cs: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------- 2 | // 3 | // Copyright 2013 Microsoft Corporation 4 | // 5 | // Licensed under the Apache License, Version 2.0 (the "License"); 6 | // you may not use this file except in compliance with the License. 7 | // You may obtain a copy of the License at 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // See the License for the specific language governing permissions and 14 | // limitations under the License. 15 | // 16 | //----------------------------------------------------------------------- 17 | 18 | namespace Sandboxable.Microsoft.WindowsAzure.Storage.Blob.Protocol 19 | { 20 | /// 21 | /// Represents the blob name prefix that is returned in the XML response for a blob listing operation. 22 | /// 23 | #if WINDOWS_RT 24 | internal 25 | #else 26 | public 27 | #endif 28 | sealed class ListBlobPrefixEntry : IListBlobEntry 29 | { 30 | /// 31 | /// Gets the blob name prefix. 32 | /// 33 | /// The blob name prefix. 34 | public string Name 35 | { 36 | get; 37 | internal set; 38 | } 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /src/Microsoft.WindowsAzure.Storage/Blob/Protocol/PageWrite.cs: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------- 2 | // 3 | // Copyright 2013 Microsoft Corporation 4 | // 5 | // Licensed under the Apache License, Version 2.0 (the "License"); 6 | // you may not use this file except in compliance with the License. 7 | // You may obtain a copy of the License at 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // See the License for the specific language governing permissions and 14 | // limitations under the License. 15 | // 16 | //----------------------------------------------------------------------- 17 | 18 | namespace Sandboxable.Microsoft.WindowsAzure.Storage.Blob.Protocol 19 | { 20 | /// 21 | /// Describes actions that may be used for writing to a page blob or clearing a set of pages. 22 | /// 23 | public enum PageWrite 24 | { 25 | /// 26 | /// Update the page with new data. 27 | /// 28 | Update, 29 | 30 | /// 31 | /// Clear the page. 32 | /// 33 | Clear 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /src/Microsoft.WindowsAzure.Storage/Blob/RehydrationStatus.cs: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------- 2 | // 3 | // Copyright 2013 Microsoft Corporation 4 | // 5 | // Licensed under the Apache License, Version 2.0 (the "License"); 6 | // you may not use this file except in compliance with the License. 7 | // You may obtain a copy of the License at 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // See the License for the specific language governing permissions and 14 | // limitations under the License. 15 | // 16 | //----------------------------------------------------------------------- 17 | 18 | namespace Sandboxable.Microsoft.WindowsAzure.Storage.Blob 19 | { 20 | /// 21 | /// The rehydration status for a blob that is currently archived. 22 | /// 23 | /// Only applicable to block blobs for this version. 24 | public enum RehydrationStatus 25 | { 26 | /// 27 | /// The rehydration status is unknown. 28 | /// 29 | Unknown, 30 | 31 | /// 32 | /// The blob is being rehydrated to hot storage. 33 | /// 34 | PendingToHot, 35 | 36 | /// 37 | /// The blob is being rehydrated to cool storage. 38 | /// 39 | PendingToCool 40 | } 41 | } -------------------------------------------------------------------------------- /src/Microsoft.WindowsAzure.Storage/Blob/SequenceNumberAction.cs: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------- 2 | // 3 | // Copyright 2013 Microsoft Corporation 4 | // 5 | // Licensed under the Apache License, Version 2.0 (the "License"); 6 | // you may not use this file except in compliance with the License. 7 | // You may obtain a copy of the License at 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // See the License for the specific language governing permissions and 14 | // limitations under the License. 15 | // 16 | //----------------------------------------------------------------------- 17 | 18 | namespace Sandboxable.Microsoft.WindowsAzure.Storage.Blob 19 | { 20 | /// 21 | /// Describes actions that can be performed on a page blob sequence number. 22 | /// 23 | public enum SequenceNumberAction 24 | { 25 | /// 26 | /// Sets the sequence number to be the higher of the value included with the request and the value currently stored for the blob. 27 | /// 28 | Max, 29 | 30 | /// 31 | /// Sets the sequence number to the value included with the request. 32 | /// 33 | Update, 34 | 35 | /// 36 | /// Increments the value of the sequence number by 1. 37 | /// 38 | Increment, 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /src/Microsoft.WindowsAzure.Storage/Blob/StandardBlobTier.cs: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------- 2 | // 3 | // Copyright 2013 Microsoft Corporation 4 | // 5 | // Licensed under the Apache License, Version 2.0 (the "License"); 6 | // you may not use this file except in compliance with the License. 7 | // You may obtain a copy of the License at 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // See the License for the specific language governing permissions and 14 | // limitations under the License. 15 | // 16 | //----------------------------------------------------------------------- 17 | 18 | namespace Sandboxable.Microsoft.WindowsAzure.Storage.Blob 19 | { 20 | /// 21 | /// The tier of the block blob on a standard storage account. 22 | /// 23 | public enum StandardBlobTier 24 | { 25 | /// 26 | /// The tier is not recognized by this version of the library 27 | /// 28 | Unknown, 29 | 30 | /// 31 | /// Hot Storage 32 | /// 33 | Hot, 34 | 35 | /// 36 | /// Cool Storage 37 | /// 38 | Cool, 39 | 40 | /// 41 | /// Archive Storage 42 | /// 43 | Archive 44 | } 45 | } -------------------------------------------------------------------------------- /src/Microsoft.WindowsAzure.Storage/Core/CommandLocationMode.cs: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------- 2 | // 3 | // Copyright 2013 Microsoft Corporation 4 | // 5 | // Licensed under the Apache License, Version 2.0 (the "License"); 6 | // you may not use this file except in compliance with the License. 7 | // You may obtain a copy of the License at 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // See the License for the specific language governing permissions and 14 | // limitations under the License. 15 | // 16 | //----------------------------------------------------------------------- 17 | 18 | namespace Sandboxable.Microsoft.WindowsAzure.Storage.Core 19 | { 20 | internal enum CommandLocationMode 21 | { 22 | PrimaryOnly, 23 | SecondaryOnly, 24 | PrimaryOrSecondary, 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /src/Microsoft.WindowsAzure.Storage/Core/Executor/ExecutorOperation.cs: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------- 2 | // 3 | // Copyright 2013 Microsoft Corporation 4 | // 5 | // Licensed under the Apache License, Version 2.0 (the "License"); 6 | // you may not use this file except in compliance with the License. 7 | // You may obtain a copy of the License at 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // See the License for the specific language governing permissions and 14 | // limitations under the License. 15 | // 16 | //----------------------------------------------------------------------- 17 | 18 | namespace Sandboxable.Microsoft.WindowsAzure.Storage.Core.Executor 19 | { 20 | internal enum ExecutorOperation 21 | { 22 | NotStarted = 0, 23 | BeginOperation, 24 | BeginGetRequestStream, 25 | EndGetRequestStream, 26 | BeginUploadRequest, 27 | EndUploadRequest, 28 | BeginGetResponse, 29 | EndGetResponse, 30 | PreProcess, 31 | GetResponseStream, 32 | BeginDownloadResponse, 33 | EndDownloadResponse, 34 | PostProcess, 35 | EndOperation, 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /src/Microsoft.WindowsAzure.Storage/Core/Executor/RecoveryActions.cs: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------- 2 | // 3 | // Copyright 2013 Microsoft Corporation 4 | // 5 | // Licensed under the Apache License, Version 2.0 (the "License"); 6 | // you may not use this file except in compliance with the License. 7 | // You may obtain a copy of the License at 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // See the License for the specific language governing permissions and 14 | // limitations under the License. 15 | // 16 | //----------------------------------------------------------------------- 17 | 18 | namespace Sandboxable.Microsoft.WindowsAzure.Storage.Core.Executor 19 | { 20 | using Sandboxable.Microsoft.WindowsAzure.Storage.Core.Util; 21 | using System; 22 | using System.IO; 23 | 24 | internal static class RecoveryActions 25 | { 26 | internal static void RewindStream(StorageCommandBase cmd, Exception ex, OperationContext ctx) 27 | { 28 | RecoveryActions.SeekStream(cmd, 0); 29 | } 30 | 31 | internal static void SeekStream(StorageCommandBase cmd, long offset) 32 | { 33 | CommonUtility.AssertNotNull("cmd", cmd); 34 | RESTCommand restCMD = (RESTCommand)cmd; 35 | restCMD.SendStream.Seek(offset, SeekOrigin.Begin); 36 | } 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /src/Microsoft.WindowsAzure.Storage/Core/Executor/TableCommand.cs: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------- 2 | // 3 | // Copyright 2013 Microsoft Corporation 4 | // 5 | // Licensed under the Apache License, Version 2.0 (the "License"); 6 | // you may not use this file except in compliance with the License. 7 | // You may obtain a copy of the License at 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // See the License for the specific language governing permissions and 14 | // limitations under the License. 15 | // 16 | //----------------------------------------------------------------------- 17 | 18 | namespace Sandboxable.Microsoft.WindowsAzure.Storage.Core.Executor 19 | { 20 | #if WINDOWS_DESKTOP && !WINDOWS_PHONE 21 | using Sandboxable.Microsoft.WindowsAzure.Storage.Table.DataServices; 22 | using System; 23 | using System.Diagnostics.CodeAnalysis; 24 | 25 | [SuppressMessage("StyleCop.CSharp.MaintainabilityRules", "SA1401:FieldsMustBePrivate", Justification = "Reviewed.")] 26 | [Obsolete("Support for accessing Windows Azure Tables via WCF Data Services is now obsolete. It's recommended that you use the Microsoft.WindowsAzure.Storage.Table namespace for working with tables.")] 27 | internal class TableCommand : StorageCommandBase 28 | { 29 | public Func ExecuteFunc; 30 | public Func Begin; 31 | public Func End; 32 | public Func, T> ParseResponse; 33 | public TableServiceContext Context = null; 34 | } 35 | #endif 36 | } 37 | -------------------------------------------------------------------------------- /src/Microsoft.WindowsAzure.Storage/Core/NullType.cs: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------- 2 | // 3 | // Copyright 2013 Microsoft Corporation 4 | // 5 | // Licensed under the Apache License, Version 2.0 (the "License"); 6 | // you may not use this file except in compliance with the License. 7 | // You may obtain a copy of the License at 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // See the License for the specific language governing permissions and 14 | // limitations under the License. 15 | // 16 | //----------------------------------------------------------------------- 17 | 18 | namespace Sandboxable.Microsoft.WindowsAzure.Storage.Core 19 | { 20 | /// 21 | /// A NullTaskReturn type. 22 | /// 23 | public sealed class NullType 24 | { 25 | /// 26 | /// Represents a no-return from a task. 27 | /// 28 | internal static readonly NullType Value = new NullType(); 29 | 30 | /// 31 | /// Prevents a default instance of the class from being created. 32 | /// 33 | private NullType() 34 | { 35 | } 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /src/Microsoft.WindowsAzure.Storage/Core/StorageRequestMessage.cs: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------- 2 | // 3 | // Copyright 2013 Microsoft Corporation 4 | // 5 | // Licensed under the Apache License, Version 2.0 (the "License"); 6 | // you may not use this file except in compliance with the License. 7 | // You may obtain a copy of the License at 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // See the License for the specific language governing permissions and 14 | // limitations under the License. 15 | // 16 | //----------------------------------------------------------------------- 17 | 18 | namespace Sandboxable.Microsoft.WindowsAzure.Storage.Core 19 | { 20 | using Sandboxable.Microsoft.WindowsAzure.Storage.Auth; 21 | using Sandboxable.Microsoft.WindowsAzure.Storage.Core.Auth; 22 | using System; 23 | using System.Net.Http; 24 | 25 | internal sealed class StorageRequestMessage : HttpRequestMessage 26 | { 27 | public ICanonicalizer Canonicalizer { get; private set; } 28 | 29 | public StorageCredentials Credentials { get; private set; } 30 | 31 | public string AccountName { get; private set; } 32 | 33 | public StorageRequestMessage(HttpMethod method, Uri requestUri, ICanonicalizer canonicalizer, StorageCredentials credentials, string accountName) 34 | : base(method, requestUri) 35 | { 36 | this.Canonicalizer = canonicalizer; 37 | this.Credentials = credentials; 38 | this.AccountName = accountName; 39 | } 40 | } 41 | } -------------------------------------------------------------------------------- /src/Microsoft.WindowsAzure.Storage/Core/Util/AsyncSemaphore.Common.cs: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------- 2 | // 3 | // Copyright 2013 Microsoft Corporation 4 | // 5 | // Licensed under the Apache License, Version 2.0 (the "License"); 6 | // you may not use this file except in compliance with the License. 7 | // You may obtain a copy of the License at 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // See the License for the specific language governing permissions and 14 | // limitations under the License. 15 | // 16 | //----------------------------------------------------------------------- 17 | 18 | namespace Sandboxable.Microsoft.WindowsAzure.Storage.Core.Util 19 | { 20 | internal partial class AsyncSemaphore 21 | { 22 | private int count; 23 | 24 | public AsyncSemaphore(int initialCount) 25 | { 26 | CommonUtility.AssertInBounds("initialCount", initialCount, 0, int.MaxValue); 27 | this.count = initialCount; 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /src/Microsoft.WindowsAzure.Storage/Core/Util/GCWatcher.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Runtime.CompilerServices; 5 | using System.Text; 6 | using System.Threading.Tasks; 7 | 8 | namespace Sandboxable.Microsoft.WindowsAzure.Storage.Core.Util 9 | { 10 | public static class GCWatcher 11 | { 12 | // NOTE: Be careful with Strings due to interning and MarshalByRefObject proxy objects 13 | private readonly static ConditionalWeakTable s_cwt = 14 | new ConditionalWeakTable(); 15 | 16 | private sealed class NotifyWhenGCd 17 | { 18 | private Object m_object; 19 | 20 | internal NotifyWhenGCd(Object obj) { m_object = obj; } 21 | public override string ToString() 22 | { 23 | return String.Format("GC'd a {0} object (ToString={1})", 24 | m_object.GetType(), m_object); 25 | } 26 | ~NotifyWhenGCd() { Console.WriteLine(this); } 27 | } 28 | 29 | public static T GCWatch(this T obj) where T : class 30 | { 31 | s_cwt.Add(obj, new NotifyWhenGCd(obj)); 32 | return obj; 33 | } 34 | 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /src/Microsoft.WindowsAzure.Storage/Core/Util/HttpResponseMessageUtils.cs: -------------------------------------------------------------------------------- 1 | // ----------------------------------------------------------------------------------------- 2 | // 3 | // Copyright 2013 Microsoft Corporation 4 | // 5 | // Licensed under the Apache License, Version 2.0 (the "License"); 6 | // you may not use this file except in compliance with the License. 7 | // You may obtain a copy of the License at 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // See the License for the specific language governing permissions and 14 | // limitations under the License. 15 | // 16 | // ----------------------------------------------------------------------------------------- 17 | 18 | namespace Sandboxable.Microsoft.WindowsAzure.Storage.Core.Util 19 | { 20 | using System.Net.Http.Headers; 21 | 22 | internal static class HttpResponseMessageUtils 23 | { 24 | /// 25 | /// Gets the first header value for a specified header or an empty string if it does not exist. 26 | /// 27 | /// A collection of headers and their values. 28 | /// The name of the header to return. 29 | /// The first header value or an empty string if the header does not exist. 30 | public static string GetHeaderSingleValueOrDefault(this HttpHeaders headers, string name) 31 | { 32 | if (headers.Contains(name)) 33 | { 34 | return CommonUtility.GetFirstHeaderValue(headers.GetValues(name)); 35 | } 36 | 37 | return string.Empty; 38 | } 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /src/Microsoft.WindowsAzure.Storage/Core/Util/StreamDescriptor.cs: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------- 2 | // 3 | // Copyright 2013 Microsoft Corporation 4 | // 5 | // Licensed under the Apache License, Version 2.0 (the "License"); 6 | // you may not use this file except in compliance with the License. 7 | // You may obtain a copy of the License at 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // See the License for the specific language governing permissions and 14 | // limitations under the License. 15 | // 16 | //----------------------------------------------------------------------- 17 | 18 | namespace Sandboxable.Microsoft.WindowsAzure.Storage.Core.Util 19 | { 20 | using System.Threading; 21 | 22 | /// 23 | /// Provides properties to keep track of Md5 hash / Length of a stream as it is being copied. 24 | /// 25 | internal class StreamDescriptor 26 | { 27 | private long length = 0; 28 | 29 | public long Length 30 | { 31 | get { return Interlocked.Read(ref this.length); } 32 | set { Interlocked.Exchange(ref this.length, value); } 33 | } 34 | 35 | private volatile string md5 = null; 36 | 37 | public string Md5 38 | { 39 | get { return this.md5; } 40 | set { this.md5 = value; } 41 | } 42 | 43 | private volatile MD5Wrapper md5HashRef = null; 44 | 45 | public MD5Wrapper Md5HashRef 46 | { 47 | get { return this.md5HashRef; } 48 | set { this.md5HashRef = value; } 49 | } 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /src/Microsoft.WindowsAzure.Storage/DoesServiceRequestAttribute.cs: -------------------------------------------------------------------------------- 1 | // ----------------------------------------------------------------------------------------- 2 | // 3 | // Copyright 2013 Microsoft Corporation 4 | // 5 | // Licensed under the Apache License, Version 2.0 (the "License"); 6 | // you may not use this file except in compliance with the License. 7 | // You may obtain a copy of the License at 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // See the License for the specific language governing permissions and 14 | // limitations under the License. 15 | // 16 | // ----------------------------------------------------------------------------------------- 17 | 18 | namespace Sandboxable.Microsoft.WindowsAzure.Storage 19 | { 20 | using System; 21 | 22 | /// 23 | /// Specifies that the method will make one or more requests to the storage service. 24 | /// 25 | [AttributeUsage(System.AttributeTargets.Method, AllowMultiple = false)] 26 | #if WINDOWS_RT 27 | internal 28 | #else 29 | public 30 | #endif 31 | sealed class DoesServiceRequestAttribute : System.Attribute 32 | { 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /src/Microsoft.WindowsAzure.Storage/EncryptionAlgorithm.cs: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------- 2 | // 3 | // Copyright 2013 Microsoft Corporation 4 | // 5 | // Licensed under the Apache License, Version 2.0 (the "License"); 6 | // you may not use this file except in compliance with the License. 7 | // You may obtain a copy of the License at 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // See the License for the specific language governing permissions and 14 | // limitations under the License. 15 | // 16 | //----------------------------------------------------------------------- 17 | 18 | namespace Sandboxable.Microsoft.WindowsAzure.Storage 19 | { 20 | /// 21 | /// Specifies the encryption algorithm used to encrypt a resource. 22 | /// 23 | internal enum EncryptionAlgorithm 24 | { 25 | /// 26 | /// AES-CBC using a 256 bit key. 27 | /// 28 | AES_CBC_256 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /src/Microsoft.WindowsAzure.Storage/File/DeleteShareSnapshotsOption.cs: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------- 2 | // 3 | // Copyright 2013 Microsoft Corporation 4 | // 5 | // Licensed under the Apache License, Version 2.0 (the "License"); 6 | // you may not use this file except in compliance with the License. 7 | // You may obtain a copy of the License at 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // See the License for the specific language governing permissions and 14 | // limitations under the License. 15 | // 16 | //----------------------------------------------------------------------- 17 | 18 | namespace Sandboxable.Microsoft.WindowsAzure.Storage.File 19 | { 20 | /// 21 | /// The set of options describing delete operation. 22 | /// 23 | public enum DeleteShareSnapshotsOption 24 | { 25 | /// 26 | /// Delete the share only. If the share has snapshots, this option will result in an error from the service. 27 | /// 28 | None, 29 | 30 | /// 31 | /// Delete the share and its snapshots. 32 | /// 33 | IncludeSnapshots 34 | } 35 | } -------------------------------------------------------------------------------- /src/Microsoft.WindowsAzure.Storage/File/FileSharePermissions.cs: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------- 2 | // 3 | // Copyright 2013 Microsoft Corporation 4 | // 5 | // Licensed under the Apache License, Version 2.0 (the "License"); 6 | // you may not use this file except in compliance with the License. 7 | // You may obtain a copy of the License at 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // See the License for the specific language governing permissions and 14 | // limitations under the License. 15 | // 16 | //----------------------------------------------------------------------- 17 | 18 | namespace Sandboxable.Microsoft.WindowsAzure.Storage.File 19 | { 20 | /// 21 | /// Represents the permissions for a share. 22 | /// 23 | public sealed class FileSharePermissions 24 | { 25 | /// 26 | /// Initializes a new instance of the class. 27 | /// 28 | public FileSharePermissions() 29 | { 30 | this.SharedAccessPolicies = new SharedAccessFilePolicies(); 31 | } 32 | 33 | /// 34 | /// Gets the set of shared access policies for the share. 35 | /// 36 | /// A object. 37 | public SharedAccessFilePolicies SharedAccessPolicies { get; private set; } 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /src/Microsoft.WindowsAzure.Storage/File/FileShareProperties.cs: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------- 2 | // 3 | // Copyright 2013 Microsoft Corporation 4 | // 5 | // Licensed under the Apache License, Version 2.0 (the "License"); 6 | // you may not use this file except in compliance with the License. 7 | // You may obtain a copy of the License at 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // See the License for the specific language governing permissions and 14 | // limitations under the License. 15 | // 16 | //----------------------------------------------------------------------- 17 | 18 | namespace Sandboxable.Microsoft.WindowsAzure.Storage.File 19 | { 20 | using Sandboxable.Microsoft.WindowsAzure.Storage.Core.Util; 21 | using Sandboxable.Microsoft.WindowsAzure.Storage.Shared.Protocol; 22 | using System; 23 | 24 | /// 25 | /// Represents the system properties for a share. 26 | /// 27 | public sealed class FileShareProperties 28 | { 29 | /// 30 | /// Gets the ETag value for the share. 31 | /// 32 | /// The share's quoted ETag value. 33 | public string ETag { get; internal set; } 34 | 35 | /// 36 | /// Gets the share's last-modified time. 37 | /// 38 | /// The share's last-modified time. 39 | public DateTimeOffset? LastModified { get; internal set; } 40 | 41 | /// 42 | /// Gets or sets the maximum size for the share, in gigabytes. 43 | /// 44 | public int? Quota { get; set; } 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /src/Microsoft.WindowsAzure.Storage/File/FileSharePublicAccessType.cs: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------- 2 | // 3 | // Copyright 2013 Microsoft Corporation 4 | // 5 | // Licensed under the Apache License, Version 2.0 (the "License"); 6 | // you may not use this file except in compliance with the License. 7 | // You may obtain a copy of the License at 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // See the License for the specific language governing permissions and 14 | // limitations under the License. 15 | // 16 | //----------------------------------------------------------------------- 17 | 18 | namespace Sandboxable.Microsoft.WindowsAzure.Storage.File 19 | { 20 | /// 21 | /// Specifies the level of public access that is allowed on the share. 22 | /// 23 | public enum FileSharePublicAccessType 24 | { 25 | /// 26 | /// No public access. Only the account owner can read resources in this share. 27 | /// 28 | Off 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /src/Microsoft.WindowsAzure.Storage/File/IListFileItem.cs: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------- 2 | // 3 | // Copyright 2013 Microsoft Corporation 4 | // 5 | // Licensed under the Apache License, Version 2.0 (the "License"); 6 | // you may not use this file except in compliance with the License. 7 | // You may obtain a copy of the License at 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // See the License for the specific language governing permissions and 14 | // limitations under the License. 15 | // 16 | //----------------------------------------------------------------------- 17 | 18 | namespace Sandboxable.Microsoft.WindowsAzure.Storage.File 19 | { 20 | using System; 21 | 22 | /// 23 | /// Represents an item that may be returned by a file listing operation. 24 | /// 25 | public interface IListFileItem 26 | { 27 | /// 28 | /// Gets the URI to the file item. 29 | /// 30 | /// The file item's URI. 31 | Uri Uri { get; } 32 | 33 | /// 34 | /// Gets the URI to the file item. 35 | /// 36 | /// The file item's URI. 37 | StorageUri StorageUri { get; } 38 | 39 | /// 40 | /// Gets the file item's parent directory. 41 | /// 42 | /// The file item's parent directory. 43 | CloudFileDirectory Parent { get; } 44 | 45 | /// 46 | /// Gets the file item's share. 47 | /// 48 | /// The file item's share. 49 | CloudFileShare Share { get; } 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /src/Microsoft.WindowsAzure.Storage/File/Protocol/FileListingContext.cs: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------- 2 | // 3 | // Copyright 2013 Microsoft Corporation 4 | // 5 | // Licensed under the Apache License, Version 2.0 (the "License"); 6 | // you may not use this file except in compliance with the License. 7 | // You may obtain a copy of the License at 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // See the License for the specific language governing permissions and 14 | // limitations under the License. 15 | // 16 | //----------------------------------------------------------------------- 17 | 18 | namespace Sandboxable.Microsoft.WindowsAzure.Storage.File.Protocol 19 | { 20 | using Sandboxable.Microsoft.WindowsAzure.Storage.Shared.Protocol; 21 | 22 | /// 23 | /// Provides a set of parameters for a file listing operation. 24 | /// 25 | #if WINDOWS_RT 26 | internal 27 | #else 28 | public 29 | #endif 30 | sealed class FileListingContext : ListingContext 31 | { 32 | /// 33 | /// Initializes a new instance of the class. 34 | /// 35 | /// The maximum number of results to return. 36 | public FileListingContext(int? maxResults) 37 | : base(null /* prefix */, maxResults) 38 | { 39 | } 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /src/Microsoft.WindowsAzure.Storage/File/Protocol/FileRangeWrite.cs: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------- 2 | // 3 | // Copyright 2013 Microsoft Corporation 4 | // 5 | // Licensed under the Apache License, Version 2.0 (the "License"); 6 | // you may not use this file except in compliance with the License. 7 | // You may obtain a copy of the License at 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // See the License for the specific language governing permissions and 14 | // limitations under the License. 15 | // 16 | //----------------------------------------------------------------------- 17 | 18 | namespace Sandboxable.Microsoft.WindowsAzure.Storage.File.Protocol 19 | { 20 | /// 21 | /// Describes actions that may be used for writing to a file or clearing a set of ranges. 22 | /// 23 | public enum FileRangeWrite 24 | { 25 | /// 26 | /// Update the file range with new data. 27 | /// 28 | Update, 29 | 30 | /// 31 | /// Clear the file range. 32 | /// 33 | Clear 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /src/Microsoft.WindowsAzure.Storage/File/Protocol/IListFileEntry.cs: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------- 2 | // 3 | // Copyright 2013 Microsoft Corporation 4 | // 5 | // Licensed under the Apache License, Version 2.0 (the "License"); 6 | // you may not use this file except in compliance with the License. 7 | // You may obtain a copy of the License at 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // See the License for the specific language governing permissions and 14 | // limitations under the License. 15 | // 16 | //----------------------------------------------------------------------- 17 | 18 | namespace Sandboxable.Microsoft.WindowsAzure.Storage.File.Protocol 19 | { 20 | /// 21 | /// Represents an item that may be returned by a file listing operation. 22 | /// 23 | #if WINDOWS_RT 24 | internal 25 | #else 26 | public 27 | #endif 28 | interface IListFileEntry 29 | { 30 | /// 31 | /// Gets the name of the file/directory item. 32 | /// 33 | /// The name of the file/directory item. 34 | string Name { get; } 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /src/Microsoft.WindowsAzure.Storage/File/ShareListingDetails.cs: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------- 2 | // 3 | // Copyright 2013 Microsoft Corporation 4 | // 5 | // Licensed under the Apache License, Version 2.0 (the "License"); 6 | // you may not use this file except in compliance with the License. 7 | // You may obtain a copy of the License at 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // See the License for the specific language governing permissions and 14 | // limitations under the License. 15 | // 16 | //----------------------------------------------------------------------- 17 | 18 | namespace Sandboxable.Microsoft.WindowsAzure.Storage.File 19 | { 20 | using System; 21 | 22 | /// 23 | /// Specifies which details to include when listing the shares in this storage account. 24 | /// 25 | [Flags] 26 | public enum ShareListingDetails 27 | { 28 | /// 29 | /// No additional details. 30 | /// 31 | None = 0x0, 32 | 33 | /// 34 | /// Retrieve share metadata. 35 | /// 36 | Metadata = 0x1, 37 | 38 | /// 39 | /// Retrieve share snapshots. 40 | /// 41 | Snapshots = 0x2, 42 | 43 | /// 44 | /// Retrieve all available details. 45 | /// 46 | All = Metadata | Snapshots 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /src/Microsoft.WindowsAzure.Storage/File/SharedAccessFilePermissions.cs: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------- 2 | // 3 | // Copyright 2013 Microsoft Corporation 4 | // 5 | // Licensed under the Apache License, Version 2.0 (the "License"); 6 | // you may not use this file except in compliance with the License. 7 | // You may obtain a copy of the License at 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // See the License for the specific language governing permissions and 14 | // limitations under the License. 15 | // 16 | //----------------------------------------------------------------------- 17 | 18 | namespace Sandboxable.Microsoft.WindowsAzure.Storage.File 19 | { 20 | using System; 21 | 22 | /// 23 | /// Specifies the set of possible permissions for a shared access policy. 24 | /// 25 | [Flags] 26 | public enum SharedAccessFilePermissions 27 | { 28 | /// 29 | /// No shared access granted. 30 | /// 31 | None = 0x0, 32 | 33 | /// 34 | /// Read access granted. 35 | /// 36 | Read = 0x1, 37 | 38 | /// 39 | /// Write access granted. 40 | /// 41 | Write = 0x2, 42 | 43 | /// 44 | /// Delete access granted for files. 45 | /// 46 | Delete = 0x4, 47 | 48 | /// 49 | /// List access granted. 50 | /// 51 | List = 0x8, 52 | 53 | /// 54 | /// Create access granted. 55 | /// 56 | Create = 0x10 57 | } 58 | } -------------------------------------------------------------------------------- /src/Microsoft.WindowsAzure.Storage/ICancellableAsyncResult.cs: -------------------------------------------------------------------------------- 1 | // ----------------------------------------------------------------------------------------- 2 | // 3 | // Copyright 2013 Microsoft Corporation 4 | // 5 | // Licensed under the Apache License, Version 2.0 (the "License"); 6 | // you may not use this file except in compliance with the License. 7 | // You may obtain a copy of the License at 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // See the License for the specific language governing permissions and 14 | // limitations under the License. 15 | // 16 | // ----------------------------------------------------------------------------------------- 17 | 18 | namespace Sandboxable.Microsoft.WindowsAzure.Storage 19 | { 20 | using System; 21 | 22 | /// 23 | /// Represents the status of an asynchronous operation and provides support for cancellation. 24 | /// 25 | public interface ICancellableAsyncResult : IAsyncResult 26 | { 27 | /// 28 | /// Cancels the asynchronous operation. 29 | /// 30 | void Cancel(); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /src/Microsoft.WindowsAzure.Storage/IContinuationToken.cs: -------------------------------------------------------------------------------- 1 | // ----------------------------------------------------------------------------------------- 2 | // 3 | // Copyright 2013 Microsoft Corporation 4 | // 5 | // Licensed under the Apache License, Version 2.0 (the "License"); 6 | // you may not use this file except in compliance with the License. 7 | // You may obtain a copy of the License at 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // See the License for the specific language governing permissions and 14 | // limitations under the License. 15 | // 16 | // ----------------------------------------------------------------------------------------- 17 | 18 | namespace Sandboxable.Microsoft.WindowsAzure.Storage 19 | { 20 | /// 21 | /// An interface required for continuation token types. 22 | /// 23 | /// The , , 24 | /// and classes implement the interface. 25 | public interface IContinuationToken 26 | { 27 | /// 28 | /// Gets the location that the token applies to. 29 | /// 30 | /// A enumeration value. 31 | StorageLocation? TargetLocation { get; set; } 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /src/Microsoft.WindowsAzure.Storage/LogLevel.cs: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------- 2 | // 3 | // Copyright 2013 Microsoft Corporation 4 | // 5 | // Licensed under the Apache License, Version 2.0 (the "License"); 6 | // you may not use this file except in compliance with the License. 7 | // You may obtain a copy of the License at 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // See the License for the specific language governing permissions and 14 | // limitations under the License. 15 | // 16 | //----------------------------------------------------------------------- 17 | 18 | namespace Sandboxable.Microsoft.WindowsAzure.Storage 19 | { 20 | /// 21 | /// Specifies what messages to output to the log. 22 | /// 23 | public enum LogLevel 24 | { 25 | /// 26 | /// Output no tracing and debugging messages. 27 | /// 28 | Off = 0, 29 | 30 | /// 31 | /// Output error-handling messages. 32 | /// 33 | Error, 34 | 35 | /// 36 | /// Output warnings and error-handling messages. 37 | /// 38 | Warning, 39 | 40 | /// 41 | /// Output informational messages, warnings, and error-handling messages. 42 | /// 43 | Informational, 44 | 45 | /// 46 | /// Output all debugging and tracing messages. 47 | /// 48 | Verbose, 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /src/Microsoft.WindowsAzure.Storage/Microsoft.WindowsAzure.Storage.nuspec: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | Sandboxable.Microsoft.WindowsAzure.Storage 5 | 0.0.0.0 6 | Winvision 7 | This library is adjusted to run in a Partial Trust environment. Azure Storage SDK 8.7.0 for Windows 8 | en-US 9 | https://github.com/Winvision/Sandboxable 10 | https://github.com/Winvision/Sandboxable/blob/master/LICENSE 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /src/Microsoft.WindowsAzure.Storage/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Resources; 2 | using System.Reflection; 3 | using System.Runtime.CompilerServices; 4 | using System.Runtime.InteropServices; 5 | 6 | // General Information about an assembly is controlled through the following 7 | // set of attributes. Change these attribute values to modify the information 8 | // associated with an assembly. 9 | [assembly: AssemblyTitle("Sandboxable.Microsoft.WindowsAzure.Storage.dll")] 10 | [assembly: AssemblyDescription("Azure Storage SDK for Windows")] 11 | [assembly: AssemblyConfiguration("")] 12 | [assembly: AssemblyCompany("Microsoft")] 13 | [assembly: AssemblyProduct("Sandboxable Windows Azure Storage")] 14 | [assembly: AssemblyCopyright("Copyright © 2013 Microsoft Corp.")] 15 | [assembly: AssemblyTrademark("Microsoft ® is a registered trademark of Microsoft Corporation.")] 16 | [assembly: AssemblyCulture("")] 17 | [assembly: NeutralResourcesLanguage("en")] 18 | 19 | // Version information for an assembly consists of the following four values: 20 | // 21 | // Major Version 22 | // Minor Version 23 | // Build Number 24 | // Revision 25 | // 26 | // You can specify all the values or you can default the Build and Revision Numbers 27 | // by using the '*' as shown below: 28 | // [assembly: AssemblyVersion("1.0.*")] 29 | [assembly: AssemblyVersion("8.7.0.0")] 30 | [assembly: AssemblyFileVersion("8.7.0.0")] -------------------------------------------------------------------------------- /src/Microsoft.WindowsAzure.Storage/Queue/CloudQueueEncryptedMessage.cs: -------------------------------------------------------------------------------- 1 | // ----------------------------------------------------------------------------------------- 2 | // 3 | // Copyright 2013 Microsoft Corporation 4 | // 5 | // Licensed under the Apache License, Version 2.0 (the "License"); 6 | // you may not use this file except in compliance with the License. 7 | // You may obtain a copy of the License at 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // See the License for the specific language governing permissions and 14 | // limitations under the License. 15 | // 16 | // ----------------------------------------------------------------------------------------- 17 | 18 | namespace Sandboxable.Microsoft.WindowsAzure.Storage.Queue 19 | { 20 | /// 21 | /// Represents the encrypted message that is stored on the service. 22 | /// 23 | internal class CloudQueueEncryptedMessage 24 | { 25 | /// 26 | /// Gets or sets the encrypted message. 27 | /// 28 | /// The encrypted message. 29 | public string EncryptedMessageContents { get; set; } 30 | 31 | /// 32 | /// Gets or sets the encryption related metadata for queue messages. 33 | /// 34 | public EncryptionData EncryptionData { get; set; } 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /src/Microsoft.WindowsAzure.Storage/Queue/MessageUpdateFields.cs: -------------------------------------------------------------------------------- 1 | // ----------------------------------------------------------------------------------------- 2 | // 3 | // Copyright 2013 Microsoft Corporation 4 | // 5 | // Licensed under the Apache License, Version 2.0 (the "License"); 6 | // you may not use this file except in compliance with the License. 7 | // You may obtain a copy of the License at 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // See the License for the specific language governing permissions and 14 | // limitations under the License. 15 | // 16 | // ----------------------------------------------------------------------------------------- 17 | 18 | namespace Sandboxable.Microsoft.WindowsAzure.Storage.Queue 19 | { 20 | using System; 21 | 22 | /// 23 | /// Enumeration controlling the options for updating queue messages. 24 | /// 25 | [Flags] 26 | public enum MessageUpdateFields 27 | { 28 | /// 29 | /// Update the message visibility timeout. 30 | /// 31 | Visibility = 0x1, 32 | 33 | /// 34 | /// Update the message content. 35 | /// 36 | Content = 0x2 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /src/Microsoft.WindowsAzure.Storage/Queue/Protocol/QueueListingDetails.cs: -------------------------------------------------------------------------------- 1 | // ----------------------------------------------------------------------------------------- 2 | // 3 | // Copyright 2013 Microsoft Corporation 4 | // 5 | // Licensed under the Apache License, Version 2.0 (the "License"); 6 | // you may not use this file except in compliance with the License. 7 | // You may obtain a copy of the License at 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // See the License for the specific language governing permissions and 14 | // limitations under the License. 15 | // 16 | // ----------------------------------------------------------------------------------------- 17 | 18 | namespace Sandboxable.Microsoft.WindowsAzure.Storage.Queue.Protocol 19 | { 20 | using System; 21 | 22 | /// 23 | /// Specifies which details to include when listing the queues in this storage account. 24 | /// 25 | [Flags] 26 | public enum QueueListingDetails 27 | { 28 | /// 29 | /// No additional details. 30 | /// 31 | None = 0x0, 32 | 33 | /// 34 | /// Retrieve queue metadata. 35 | /// 36 | Metadata = 0x1, 37 | 38 | /// 39 | /// Retrieve all available details. 40 | /// 41 | All = 0x1 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /src/Microsoft.WindowsAzure.Storage/Queue/Protocol/QueuePermissions.cs: -------------------------------------------------------------------------------- 1 | // ----------------------------------------------------------------------------------------- 2 | // 3 | // Copyright 2013 Microsoft Corporation 4 | // 5 | // Licensed under the Apache License, Version 2.0 (the "License"); 6 | // you may not use this file except in compliance with the License. 7 | // You may obtain a copy of the License at 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // See the License for the specific language governing permissions and 14 | // limitations under the License. 15 | // 16 | // ----------------------------------------------------------------------------------------- 17 | 18 | namespace Sandboxable.Microsoft.WindowsAzure.Storage.Queue.Protocol 19 | { 20 | /// 21 | /// Represents the permissions for a queue. 22 | /// 23 | public sealed class QueuePermissions 24 | { 25 | /// 26 | /// Initializes a new instance of the class. 27 | /// 28 | public QueuePermissions() 29 | { 30 | this.SharedAccessPolicies = new SharedAccessQueuePolicies(); 31 | } 32 | 33 | /// 34 | /// Gets the set of shared access policies for the queue. 35 | /// 36 | /// The set of shared access policies for the queue. 37 | public SharedAccessQueuePolicies SharedAccessPolicies { get; private set; } 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /src/Microsoft.WindowsAzure.Storage/Queue/QueueMessageType.cs: -------------------------------------------------------------------------------- 1 | // ----------------------------------------------------------------------------------------- 2 | // 3 | // Copyright 2013 Microsoft Corporation 4 | // 5 | // Licensed under the Apache License, Version 2.0 (the "License"); 6 | // you may not use this file except in compliance with the License. 7 | // You may obtain a copy of the License at 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // See the License for the specific language governing permissions and 14 | // limitations under the License. 15 | // 16 | // ----------------------------------------------------------------------------------------- 17 | 18 | namespace Sandboxable.Microsoft.WindowsAzure.Storage.Queue 19 | { 20 | /// 21 | /// Enum for Queue message type. 22 | /// Internal use only. 23 | /// 24 | internal enum QueueMessageType 25 | { 26 | /// 27 | /// Indicates the message object stores the raw text string. 28 | /// 29 | RawString, 30 | 31 | /// 32 | /// Indicates the message object stores the Base64-Encoded representation of the raw data. 33 | /// 34 | Base64Encoded, 35 | 36 | /// 37 | /// Indicates the message object stores the raw binary data. 38 | /// 39 | RawBytes 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /src/Microsoft.WindowsAzure.Storage/Queue/SharedAccessQueuePermissions.cs: -------------------------------------------------------------------------------- 1 | // ----------------------------------------------------------------------------------------- 2 | // 3 | // Copyright 2013 Microsoft Corporation 4 | // 5 | // Licensed under the Apache License, Version 2.0 (the "License"); 6 | // you may not use this file except in compliance with the License. 7 | // You may obtain a copy of the License at 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // See the License for the specific language governing permissions and 14 | // limitations under the License. 15 | // 16 | // ----------------------------------------------------------------------------------------- 17 | 18 | namespace Sandboxable.Microsoft.WindowsAzure.Storage.Queue 19 | { 20 | using System; 21 | 22 | /// 23 | /// Specifies the set of possible permissions for a shared access queue policy. 24 | /// 25 | [Flags] 26 | public enum SharedAccessQueuePermissions 27 | { 28 | /// 29 | /// No shared access granted. 30 | /// 31 | None = 0x0, 32 | 33 | /// 34 | /// Permission to peek messages and get queue metadata granted. 35 | /// 36 | Read = 0x1, 37 | 38 | /// 39 | /// Permission to add messages granted. 40 | /// 41 | Add = 0x2, 42 | 43 | /// 44 | /// Permissions to update messages granted. 45 | /// 46 | Update = 0x4, 47 | 48 | /// 49 | /// Permission to get and delete messages granted. 50 | /// 51 | ProcessMessages = 0x8 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /src/Microsoft.WindowsAzure.Storage/Shared/Protocol/CorsProperties.cs: -------------------------------------------------------------------------------- 1 | // ----------------------------------------------------------------------------------------- 2 | // 3 | // Copyright 2013 Microsoft Corporation 4 | // 5 | // Licensed under the Apache License, Version 2.0 (the "License"); 6 | // you may not use this file except in compliance with the License. 7 | // You may obtain a copy of the License at 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // See the License for the specific language governing permissions and 14 | // limitations under the License. 15 | // 16 | // ----------------------------------------------------------------------------------------- 17 | 18 | namespace Sandboxable.Microsoft.WindowsAzure.Storage.Shared.Protocol 19 | { 20 | using System.Collections.Generic; 21 | 22 | /// 23 | /// Class representing the service properties pertaining to CORS. 24 | /// 25 | public sealed class CorsProperties 26 | { 27 | /// 28 | /// Constructs a CORS Properties object. 29 | /// 30 | public CorsProperties() 31 | { 32 | this.CorsRules = new List(); 33 | } 34 | 35 | /// 36 | /// Gets or sets CORS rules. The order of the list corresponds to precedence of rules. 37 | /// 38 | /// A collection containing CORS rules, limited to 5. 39 | public IList CorsRules { get; internal set; } 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /src/Microsoft.WindowsAzure.Storage/Shared/Protocol/GeoReplicationStatus.cs: -------------------------------------------------------------------------------- 1 | // ----------------------------------------------------------------------------------------- 2 | // 3 | // Copyright 2013 Microsoft Corporation 4 | // 5 | // Licensed under the Apache License, Version 2.0 (the "License"); 6 | // you may not use this file except in compliance with the License. 7 | // You may obtain a copy of the License at 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // See the License for the specific language governing permissions and 14 | // limitations under the License. 15 | // 16 | // ----------------------------------------------------------------------------------------- 17 | 18 | namespace Sandboxable.Microsoft.WindowsAzure.Storage.Shared.Protocol 19 | { 20 | /// 21 | /// Enumeration representing the state of geo-replication in a service. 22 | /// 23 | public enum GeoReplicationStatus 24 | { 25 | /// 26 | /// Status of geo-replication is unavailable. 27 | /// 28 | Unavailable, 29 | 30 | /// 31 | /// Geo-replication is live. 32 | /// 33 | Live, 34 | 35 | /// 36 | /// Data is being bootstrapped from primary to secondary. 37 | /// 38 | Bootstrap, 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /src/Microsoft.WindowsAzure.Storage/Shared/Protocol/HttpContentFactory.cs: -------------------------------------------------------------------------------- 1 | // ----------------------------------------------------------------------------------------- 2 | // 3 | // Copyright 2013 Microsoft Corporation 4 | // 5 | // Licensed under the Apache License, Version 2.0 (the "License"); 6 | // you may not use this file except in compliance with the License. 7 | // You may obtain a copy of the License at 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // See the License for the specific language governing permissions and 14 | // limitations under the License. 15 | // 16 | // ----------------------------------------------------------------------------------------- 17 | 18 | namespace Sandboxable.Microsoft.WindowsAzure.Storage.Shared.Protocol 19 | { 20 | using Sandboxable.Microsoft.WindowsAzure.Storage.Core; 21 | using Sandboxable.Microsoft.WindowsAzure.Storage.Core.Executor; 22 | using System; 23 | using System.IO; 24 | using System.Net.Http; 25 | 26 | internal static class HttpContentFactory 27 | { 28 | public static HttpContent BuildContentFromStream(Stream stream, long offset, long? length, string md5, RESTCommand cmd, OperationContext operationContext) 29 | { 30 | stream.Seek(offset, SeekOrigin.Begin); 31 | 32 | HttpContent retContent = new RetryableStreamContent(stream); 33 | retContent.Headers.ContentLength = length; 34 | #if !PORTABLE 35 | if (md5 != null) 36 | { 37 | retContent.Headers.ContentMD5 = Convert.FromBase64String(md5); 38 | } 39 | #endif 40 | 41 | return retContent; 42 | } 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /src/Microsoft.WindowsAzure.Storage/Shared/Protocol/LoggingOperations.cs: -------------------------------------------------------------------------------- 1 | // ----------------------------------------------------------------------------------------- 2 | // 3 | // Copyright 2013 Microsoft Corporation 4 | // 5 | // Licensed under the Apache License, Version 2.0 (the "License"); 6 | // you may not use this file except in compliance with the License. 7 | // You may obtain a copy of the License at 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // See the License for the specific language governing permissions and 14 | // limitations under the License. 15 | // 16 | // ----------------------------------------------------------------------------------------- 17 | 18 | namespace Sandboxable.Microsoft.WindowsAzure.Storage.Shared.Protocol 19 | { 20 | using System; 21 | 22 | /// 23 | /// Enumeration representing the state of logging in a service. 24 | /// 25 | [Flags] 26 | public enum LoggingOperations 27 | { 28 | /// 29 | /// Logging is disabled. 30 | /// 31 | None = 0x0, 32 | 33 | /// 34 | /// Log read operations. 35 | /// 36 | Read = 0x1, 37 | 38 | /// 39 | /// Log write operations. 40 | /// 41 | Write = 0x2, 42 | 43 | /// 44 | /// Log delete operations. 45 | /// 46 | Delete = 0x4, 47 | 48 | /// 49 | /// Log all operations. 50 | /// 51 | All = 0x7 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /src/Microsoft.WindowsAzure.Storage/Shared/Protocol/MetricsLevel.cs: -------------------------------------------------------------------------------- 1 | // ----------------------------------------------------------------------------------------- 2 | // 3 | // Copyright 2013 Microsoft Corporation 4 | // 5 | // Licensed under the Apache License, Version 2.0 (the "License"); 6 | // you may not use this file except in compliance with the License. 7 | // You may obtain a copy of the License at 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // See the License for the specific language governing permissions and 14 | // limitations under the License. 15 | // 16 | // ----------------------------------------------------------------------------------------- 17 | 18 | namespace Sandboxable.Microsoft.WindowsAzure.Storage.Shared.Protocol 19 | { 20 | /// 21 | /// Enumeration representing the state of metrics collection in a service. 22 | /// 23 | public enum MetricsLevel 24 | { 25 | /// 26 | /// Metrics collection is disabled. 27 | /// 28 | None = 0, 29 | 30 | /// 31 | /// Service-level metrics collection is enabled. 32 | /// 33 | Service, 34 | 35 | /// 36 | /// Service-level and API metrics collection are enabled. 37 | /// 38 | ServiceAndApi 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /src/Microsoft.WindowsAzure.Storage/Shared/Protocol/StorageService.cs: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------- 2 | // 3 | // Copyright 2013 Microsoft Corporation 4 | // 5 | // Licensed under the Apache License, Version 2.0 (the "License"); 6 | // you may not use this file except in compliance with the License. 7 | // You may obtain a copy of the License at 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // See the License for the specific language governing permissions and 14 | // limitations under the License. 15 | // 16 | //----------------------------------------------------------------------- 17 | 18 | namespace Sandboxable.Microsoft.WindowsAzure.Storage.Shared.Protocol 19 | { 20 | /// 21 | /// Represents a storage service. 22 | /// 23 | public enum StorageService 24 | { 25 | /// 26 | /// Blob service. 27 | /// 28 | Blob, 29 | 30 | /// 31 | /// Queue Service. 32 | /// 33 | Queue, 34 | 35 | /// 36 | /// Table Service. 37 | /// 38 | Table, 39 | 40 | /// 41 | /// File Service. 42 | /// 43 | File, 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /src/Microsoft.WindowsAzure.Storage/SharedAccessAccountResourceTypes.cs: -------------------------------------------------------------------------------- 1 | // ----------------------------------------------------------------------------------------- 2 | // 3 | // Copyright 2013 Microsoft Corporation 4 | // 5 | // Licensed under the Apache License, Version 2.0 (the "License"); 6 | // you may not use this file except in compliance with the License. 7 | // You may obtain a copy of the License at 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // See the License for the specific language governing permissions and 14 | // limitations under the License. 15 | // 16 | // ----------------------------------------------------------------------------------------- 17 | 18 | namespace Sandboxable.Microsoft.WindowsAzure.Storage 19 | { 20 | using System; 21 | 22 | /// 23 | /// Specifies the set of possible signed resource types for a shared access account policy. 24 | /// 25 | [Flags] 26 | public enum SharedAccessAccountResourceTypes 27 | { 28 | /// 29 | /// No shared access granted. 30 | /// 31 | None = 0x0, 32 | 33 | /// 34 | /// Permission to access service level APIs granted. 35 | /// 36 | Service = 0x1, 37 | 38 | /// 39 | /// Permission to access container level APIs (Blob Containers, Tables, Queues, File Shares) granted. 40 | /// 41 | Container = 0x2, 42 | 43 | /// 44 | /// Permission to access object level APIs (Blobs, Table Entities, Queue Messages, Files) granted 45 | /// 46 | Object = 0x4 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /src/Microsoft.WindowsAzure.Storage/SharedAccessAccountServices.cs: -------------------------------------------------------------------------------- 1 | // ----------------------------------------------------------------------------------------- 2 | // 3 | // Copyright 2013 Microsoft Corporation 4 | // 5 | // Licensed under the Apache License, Version 2.0 (the "License"); 6 | // you may not use this file except in compliance with the License. 7 | // You may obtain a copy of the License at 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // See the License for the specific language governing permissions and 14 | // limitations under the License. 15 | // 16 | // ----------------------------------------------------------------------------------------- 17 | 18 | namespace Sandboxable.Microsoft.WindowsAzure.Storage 19 | { 20 | using System; 21 | 22 | /// 23 | /// Specifies the set of possible signed services for a shared access account policy. 24 | /// 25 | [Flags] 26 | public enum SharedAccessAccountServices 27 | { 28 | /// 29 | /// No shared access granted. 30 | /// 31 | None = 0x0, 32 | 33 | /// 34 | /// Permission to access blob resources granted. 35 | /// 36 | Blob = 0x1, 37 | 38 | /// 39 | /// Permission to access file resources granted. 40 | /// 41 | File = 0x2, 42 | 43 | /// 44 | /// Permission to access queue resources granted. 45 | /// 46 | Queue = 0x4, 47 | 48 | /// 49 | /// Permission to access table resources granted. 50 | /// 51 | Table = 0x8 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /src/Microsoft.WindowsAzure.Storage/SharedAccessProtocol.cs: -------------------------------------------------------------------------------- 1 | // ----------------------------------------------------------------------------------------- 2 | // 3 | // Copyright 2013 Microsoft Corporation 4 | // 5 | // Licensed under the Apache License, Version 2.0 (the "License"); 6 | // you may not use this file except in compliance with the License. 7 | // You may obtain a copy of the License at 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // See the License for the specific language governing permissions and 14 | // limitations under the License. 15 | // 16 | // ----------------------------------------------------------------------------------------- 17 | 18 | namespace Sandboxable.Microsoft.WindowsAzure.Storage 19 | { 20 | using System; 21 | 22 | /// 23 | /// Specifies the set of possible signed protocols for a shared access account policy. 24 | /// 25 | public enum SharedAccessProtocol 26 | { 27 | /// 28 | /// Permission to use SAS only through https granted. 29 | /// 30 | HttpsOnly = 0x1, 31 | 32 | /// 33 | /// Permission to use SAS through https or http granted. Equivalent to not specifying any permission at all. 34 | /// 35 | HttpsOrHttp = 0x2 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /src/Microsoft.WindowsAzure.Storage/StorageLocation.cs: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------- 2 | // 3 | // Copyright 2013 Microsoft Corporation 4 | // 5 | // Licensed under the Apache License, Version 2.0 (the "License"); 6 | // you may not use this file except in compliance with the License. 7 | // You may obtain a copy of the License at 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // See the License for the specific language governing permissions and 14 | // limitations under the License. 15 | // 16 | //----------------------------------------------------------------------- 17 | 18 | namespace Sandboxable.Microsoft.WindowsAzure.Storage 19 | { 20 | /// 21 | /// Represents a storage service location. 22 | /// 23 | public enum StorageLocation 24 | { 25 | /// 26 | /// Primary storage service location. 27 | /// 28 | Primary, 29 | 30 | /// 31 | /// Secondary storage service location. 32 | /// 33 | Secondary, 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /src/Microsoft.WindowsAzure.Storage/Table/EncryptPropertyAttribute.cs: -------------------------------------------------------------------------------- 1 | // ----------------------------------------------------------------------------------------- 2 | // 3 | // Copyright 2013 Microsoft Corporation 4 | // 5 | // Licensed under the Apache License, Version 2.0 (the "License"); 6 | // you may not use this file except in compliance with the License. 7 | // You may obtain a copy of the License at 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // See the License for the specific language governing permissions and 14 | // limitations under the License. 15 | // 16 | // ----------------------------------------------------------------------------------------- 17 | 18 | namespace Sandboxable.Microsoft.WindowsAzure.Storage.Table 19 | { 20 | using System; 21 | 22 | /// 23 | /// Represents a custom attribute that can be used to indicate whether an entity property should be encrypted. 24 | /// 25 | [AttributeUsage(AttributeTargets.Property, AllowMultiple = false)] 26 | public sealed class EncryptPropertyAttribute : Attribute 27 | { 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /src/Microsoft.WindowsAzure.Storage/Table/EntityPropertyConverterOptions.cs: -------------------------------------------------------------------------------- 1 | // ----------------------------------------------------------------------------------------- 2 | // 3 | // Copyright 2013 Microsoft Corporation 4 | // 5 | // Licensed under the Apache License, Version 2.0 (the "License"); 6 | // you may not use this file except in compliance with the License. 7 | // You may obtain a copy of the License at 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // See the License for the specific language governing permissions and 14 | // limitations under the License. 15 | // 16 | // ----------------------------------------------------------------------------------------- 17 | 18 | namespace Sandboxable.Microsoft.WindowsAzure.Storage.Table 19 | { 20 | /// 21 | /// Represents a set of options that may be specified for flattening and re-composition of objects by the Entity property converter. 22 | /// 23 | public class EntityPropertyConverterOptions 24 | { 25 | private string propertyNameDelimiter = EntityPropertyConverter.DefaultPropertyNameDelimiter; 26 | 27 | /// 28 | /// Gets or sets the delimiter that will be used to separate names of nested properties. 29 | /// 30 | public string PropertyNameDelimiter 31 | { 32 | get 33 | { 34 | return propertyNameDelimiter; 35 | } 36 | 37 | set 38 | { 39 | propertyNameDelimiter = value; 40 | } 41 | } 42 | } 43 | } -------------------------------------------------------------------------------- /src/Microsoft.WindowsAzure.Storage/Table/EntityReadFlags.cs: -------------------------------------------------------------------------------- 1 | // ----------------------------------------------------------------------------------------- 2 | // 3 | // Copyright 2013 Microsoft Corporation 4 | // 5 | // Licensed under the Apache License, Version 2.0 (the "License"); 6 | // you may not use this file except in compliance with the License. 7 | // You may obtain a copy of the License at 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // See the License for the specific language governing permissions and 14 | // limitations under the License. 15 | // 16 | // ----------------------------------------------------------------------------------------- 17 | 18 | namespace Sandboxable.Microsoft.WindowsAzure.Storage.Table 19 | { 20 | using System; 21 | 22 | [Flags] 23 | internal enum EntityReadFlags 24 | { 25 | PartitionKey = 0x01, 26 | RowKey = 0x02, 27 | Timestamp = 0x04, 28 | Etag = 0x08, 29 | Properties = 0x10, 30 | All = 0x1f 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /src/Microsoft.WindowsAzure.Storage/Table/IgnorePropertyAttribute.cs: -------------------------------------------------------------------------------- 1 | // ----------------------------------------------------------------------------------------- 2 | // 3 | // Copyright 2013 Microsoft Corporation 4 | // 5 | // Licensed under the Apache License, Version 2.0 (the "License"); 6 | // you may not use this file except in compliance with the License. 7 | // You may obtain a copy of the License at 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // See the License for the specific language governing permissions and 14 | // limitations under the License. 15 | // 16 | // ----------------------------------------------------------------------------------------- 17 | 18 | namespace Sandboxable.Microsoft.WindowsAzure.Storage.Table 19 | { 20 | using System; 21 | 22 | /// 23 | /// Represents a custom attribute that can be used to ignore entity properties during serialization/de-serialization. 24 | /// 25 | [AttributeUsage(AttributeTargets.Property, AllowMultiple = false)] 26 | public sealed class IgnorePropertyAttribute : Attribute 27 | { 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /src/Microsoft.WindowsAzure.Storage/Table/Queryable/EntityResolverQueryOptionExpression.cs: -------------------------------------------------------------------------------- 1 | // ----------------------------------------------------------------------------------------- 2 | // 3 | // Copyright 2013 Microsoft Corporation 4 | // 5 | // Licensed under the Apache License, Version 2.0 (the "License"); 6 | // you may not use this file except in compliance with the License. 7 | // You may obtain a copy of the License at 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // See the License for the specific language governing permissions and 14 | // limitations under the License. 15 | // 16 | // ----------------------------------------------------------------------------------------- 17 | 18 | namespace Sandboxable.Microsoft.WindowsAzure.Storage.Table.Queryable 19 | { 20 | using System; 21 | using System.Diagnostics; 22 | using System.Linq.Expressions; 23 | 24 | [DebuggerDisplay("EntityResolverQueryOptionExpression {requestOptions}")] 25 | internal class EntityResolverQueryOptionExpression : QueryOptionExpression 26 | { 27 | private ConstantExpression resolver; 28 | 29 | internal EntityResolverQueryOptionExpression(Type type, ConstantExpression resolver) 30 | : base((ExpressionType)ResourceExpressionType.Resolver, type) 31 | { 32 | this.resolver = resolver; 33 | } 34 | 35 | internal ConstantExpression Resolver 36 | { 37 | get 38 | { 39 | return this.resolver; 40 | } 41 | } 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /src/Microsoft.WindowsAzure.Storage/Table/Queryable/FilterQueryOptionExpression.cs: -------------------------------------------------------------------------------- 1 | // ----------------------------------------------------------------------------------------- 2 | // 3 | // Copyright 2013 Microsoft Corporation 4 | // 5 | // Licensed under the Apache License, Version 2.0 (the "License"); 6 | // you may not use this file except in compliance with the License. 7 | // You may obtain a copy of the License at 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // See the License for the specific language governing permissions and 14 | // limitations under the License. 15 | // 16 | // ----------------------------------------------------------------------------------------- 17 | 18 | namespace Sandboxable.Microsoft.WindowsAzure.Storage.Table.Queryable 19 | { 20 | using System; 21 | using System.Linq.Expressions; 22 | 23 | internal class FilterQueryOptionExpression : QueryOptionExpression 24 | { 25 | private Expression predicate; 26 | 27 | internal FilterQueryOptionExpression(Type type, Expression predicate) 28 | : base((ExpressionType)ResourceExpressionType.FilterQueryOption, type) 29 | { 30 | this.predicate = predicate; 31 | } 32 | 33 | internal Expression Predicate 34 | { 35 | get 36 | { 37 | return this.predicate; 38 | } 39 | } 40 | } 41 | } -------------------------------------------------------------------------------- /src/Microsoft.WindowsAzure.Storage/Table/Queryable/OperationContextQueryOptionExpression.cs: -------------------------------------------------------------------------------- 1 | // ----------------------------------------------------------------------------------------- 2 | // 3 | // Copyright 2013 Microsoft Corporation 4 | // 5 | // Licensed under the Apache License, Version 2.0 (the "License"); 6 | // you may not use this file except in compliance with the License. 7 | // You may obtain a copy of the License at 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // See the License for the specific language governing permissions and 14 | // limitations under the License. 15 | // 16 | // ----------------------------------------------------------------------------------------- 17 | 18 | namespace Sandboxable.Microsoft.WindowsAzure.Storage.Table.Queryable 19 | { 20 | using System; 21 | using System.Diagnostics; 22 | using System.Linq.Expressions; 23 | 24 | [DebuggerDisplay("OperationContextQueryOptionExpression {operationContext}")] 25 | internal class OperationContextQueryOptionExpression : QueryOptionExpression 26 | { 27 | private ConstantExpression operationContext; 28 | 29 | internal OperationContextQueryOptionExpression(Type type, ConstantExpression operationContext) 30 | : base((ExpressionType)ResourceExpressionType.OperationContext, type) 31 | { 32 | this.operationContext = operationContext; 33 | } 34 | 35 | internal ConstantExpression OperationContext 36 | { 37 | get 38 | { 39 | return this.operationContext; 40 | } 41 | } 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /src/Microsoft.WindowsAzure.Storage/Table/Queryable/QueryOptionExpression.cs: -------------------------------------------------------------------------------- 1 | // ----------------------------------------------------------------------------------------- 2 | // 3 | // Copyright 2013 Microsoft Corporation 4 | // 5 | // Licensed under the Apache License, Version 2.0 (the "License"); 6 | // you may not use this file except in compliance with the License. 7 | // You may obtain a copy of the License at 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // See the License for the specific language governing permissions and 14 | // limitations under the License. 15 | // 16 | // ----------------------------------------------------------------------------------------- 17 | 18 | namespace Sandboxable.Microsoft.WindowsAzure.Storage.Table.Queryable 19 | { 20 | using System; 21 | using System.Diagnostics; 22 | using System.Linq.Expressions; 23 | 24 | internal abstract class QueryOptionExpression : Expression 25 | { 26 | #pragma warning disable 618 27 | internal QueryOptionExpression(ExpressionType nodeType, Type type) : base(nodeType, type) 28 | { 29 | } 30 | #pragma warning restore 618 31 | 32 | internal virtual QueryOptionExpression ComposeMultipleSpecification(QueryOptionExpression previous) 33 | { 34 | Debug.Assert(previous != null, "other != null"); 35 | Debug.Assert(previous.GetType() == this.GetType(), "other.GetType == this.GetType() -- otherwise it's not the same specification"); 36 | return this; 37 | } 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /src/Microsoft.WindowsAzure.Storage/Table/Queryable/RequestOptionsQueryOptionExpression.cs: -------------------------------------------------------------------------------- 1 | // ----------------------------------------------------------------------------------------- 2 | // 3 | // Copyright 2013 Microsoft Corporation 4 | // 5 | // Licensed under the Apache License, Version 2.0 (the "License"); 6 | // you may not use this file except in compliance with the License. 7 | // You may obtain a copy of the License at 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // See the License for the specific language governing permissions and 14 | // limitations under the License. 15 | // 16 | // ----------------------------------------------------------------------------------------- 17 | 18 | namespace Sandboxable.Microsoft.WindowsAzure.Storage.Table.Queryable 19 | { 20 | using System; 21 | using System.Diagnostics; 22 | using System.Linq.Expressions; 23 | 24 | [DebuggerDisplay("RequestOptionsQueryOptionExpression {requestOptions}")] 25 | internal class RequestOptionsQueryOptionExpression : QueryOptionExpression 26 | { 27 | private ConstantExpression requestOptions; 28 | 29 | internal RequestOptionsQueryOptionExpression(Type type, ConstantExpression requestOptions) 30 | : base((ExpressionType)ResourceExpressionType.RequestOptions, type) 31 | { 32 | this.requestOptions = requestOptions; 33 | } 34 | 35 | internal ConstantExpression RequestOptions 36 | { 37 | get 38 | { 39 | return this.requestOptions; 40 | } 41 | } 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /src/Microsoft.WindowsAzure.Storage/Table/Queryable/ResourceExpressionType.cs: -------------------------------------------------------------------------------- 1 | // ----------------------------------------------------------------------------------------- 2 | // 3 | // Copyright 2013 Microsoft Corporation 4 | // 5 | // Licensed under the Apache License, Version 2.0 (the "License"); 6 | // you may not use this file except in compliance with the License. 7 | // You may obtain a copy of the License at 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // See the License for the specific language governing permissions and 14 | // limitations under the License. 15 | // 16 | // ----------------------------------------------------------------------------------------- 17 | 18 | namespace Sandboxable.Microsoft.WindowsAzure.Storage.Table.Queryable 19 | { 20 | internal enum ResourceExpressionType 21 | { 22 | RootResourceSet = 10000, 23 | 24 | ResourceNavigationProperty, 25 | 26 | ResourceNavigationPropertySingleton, 27 | 28 | TakeQueryOption, 29 | 30 | SkipQueryOption, 31 | 32 | OrderByQueryOption, 33 | 34 | FilterQueryOption, 35 | 36 | InputReference, 37 | 38 | ProjectionQueryOption, 39 | 40 | RequestOptions, 41 | 42 | OperationContext, 43 | 44 | Resolver, 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /src/Microsoft.WindowsAzure.Storage/Table/SharedAccessTablePermissions.cs: -------------------------------------------------------------------------------- 1 | // ----------------------------------------------------------------------------------------- 2 | // 3 | // Copyright 2013 Microsoft Corporation 4 | // 5 | // Licensed under the Apache License, Version 2.0 (the "License"); 6 | // you may not use this file except in compliance with the License. 7 | // You may obtain a copy of the License at 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // See the License for the specific language governing permissions and 14 | // limitations under the License. 15 | // 16 | // ----------------------------------------------------------------------------------------- 17 | 18 | namespace Sandboxable.Microsoft.WindowsAzure.Storage.Table 19 | { 20 | using System; 21 | 22 | /// 23 | /// Specifies the set of possible permissions for a shared access table policy. 24 | /// 25 | [Flags] 26 | public enum SharedAccessTablePermissions 27 | { 28 | /// 29 | /// No shared access granted. 30 | /// 31 | None = 0x0, 32 | 33 | /// 34 | /// Permission to query entities granted. 35 | /// 36 | Query = 0x1, 37 | 38 | /// 39 | /// Permission to add entities granted. 40 | /// 41 | Add = 0x2, 42 | 43 | /// 44 | /// Permission to modify entities granted. 45 | /// 46 | Update = 0x4, 47 | 48 | /// 49 | /// Permission to delete entities granted. 50 | /// 51 | Delete = 0x8 52 | } 53 | } -------------------------------------------------------------------------------- /src/Microsoft.WindowsAzure.Storage/Table/TablePayloadFormat.cs: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------- 2 | // 3 | // Copyright 2013 Microsoft Corporation 4 | // 5 | // Licensed under the Apache License, Version 2.0 (the "License"); 6 | // you may not use this file except in compliance with the License. 7 | // You may obtain a copy of the License at 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // See the License for the specific language governing permissions and 14 | // limitations under the License. 15 | // 16 | //----------------------------------------------------------------------- 17 | 18 | namespace Sandboxable.Microsoft.WindowsAzure.Storage.Table 19 | { 20 | using System; 21 | 22 | /// 23 | /// Describes the payload formats supported for Tables. 24 | /// 25 | public enum TablePayloadFormat 26 | { 27 | /// 28 | /// Use JSON with full metadata. 29 | /// 30 | JsonFullMetadata, 31 | 32 | /// 33 | /// Use JSON with minimal metadata. 34 | /// 35 | Json, 36 | 37 | /// 38 | /// Use JSON with no metadata. 39 | /// 40 | JsonNoMetadata 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /src/Microsoft.WindowsAzure.Storage/Table/TablePermissions.cs: -------------------------------------------------------------------------------- 1 | // ----------------------------------------------------------------------------------------- 2 | // 3 | // Copyright 2013 Microsoft Corporation 4 | // 5 | // Licensed under the Apache License, Version 2.0 (the "License"); 6 | // you may not use this file except in compliance with the License. 7 | // You may obtain a copy of the License at 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // See the License for the specific language governing permissions and 14 | // limitations under the License. 15 | // 16 | // ----------------------------------------------------------------------------------------- 17 | 18 | namespace Sandboxable.Microsoft.WindowsAzure.Storage.Table 19 | { 20 | /// 21 | /// Represents the permissions for a table. 22 | /// 23 | public sealed class TablePermissions 24 | { 25 | /// 26 | /// Initializes a new instance of the class. 27 | /// 28 | public TablePermissions() 29 | { 30 | this.SharedAccessPolicies = new SharedAccessTablePolicies(); 31 | } 32 | 33 | /// 34 | /// Gets the set of shared access policies for the container. 35 | /// 36 | /// A object. 37 | public SharedAccessTablePolicies SharedAccessPolicies { get; private set; } 38 | } 39 | } -------------------------------------------------------------------------------- /src/Microsoft.WindowsAzure.Storage/TaskExtension.cs: -------------------------------------------------------------------------------- 1 | // ----------------------------------------------------------------------------------------- 2 | // 3 | // Copyright 2013 Microsoft Corporation 4 | // 5 | // Licensed under the Apache License, Version 2.0 (the "License"); 6 | // you may not use this file except in compliance with the License. 7 | // You may obtain a copy of the License at 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // See the License for the specific language governing permissions and 14 | // limitations under the License. 15 | // 16 | // ----------------------------------------------------------------------------------------- 17 | 18 | namespace Sandboxable.Microsoft.WindowsAzure.Storage 19 | { 20 | using System.Threading.Tasks; 21 | 22 | /// 23 | /// Task Extension to share code with WinRT calls 24 | /// 25 | internal static class TaskExtensinon 26 | { 27 | /// 28 | /// Return task itself 29 | /// 30 | /// input task. 31 | /// The input task. 32 | public static Task AsTask(this Task task) 33 | { 34 | return task; 35 | } 36 | 37 | /// 38 | /// Return input task itself 39 | /// 40 | /// The type of object that returns the result of the asynchronous operation. 41 | /// input task. 42 | /// The input task. 43 | public static Task AsTask(this Task task) 44 | { 45 | return task; 46 | } 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /src/Microsoft.WindowsAzure.Storage/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /src/SandboxTester/SandboxTester/App.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /src/SandboxTester/SandboxTester/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Security; 3 | 4 | // General Information about an assembly is controlled through the following 5 | // set of attributes. Change these attribute values to modify the information 6 | // associated with an assembly. 7 | [assembly: AssemblyTitle("SandboxTester")] 8 | [assembly: AssemblyDescription("Sample code to show and test assemblies that are not allowed to run in a sandbox")] 9 | [assembly: AssemblyConfiguration("")] 10 | [assembly: AssemblyCompany("Winvision")] 11 | [assembly: AssemblyProduct("SandboxTester")] 12 | [assembly: AssemblyCopyright("Copyright © Winvision 2016")] 13 | [assembly: AssemblyTrademark("")] 14 | [assembly: AssemblyCulture("")] 15 | 16 | [assembly: AssemblyVersion("1.0.0.0")] 17 | [assembly: AssemblyFileVersion("1.0.0.0")] 18 | 19 | [assembly: SecurityRules(SecurityRuleSet.Level2)] -------------------------------------------------------------------------------- /src/SandboxTester/SandboxTester/SandboxTester.snk: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Winvision/Sandboxable/bd81e49645833a835a8c05470936ba9ade91f0f1/src/SandboxTester/SandboxTester/SandboxTester.snk -------------------------------------------------------------------------------- /src/SandboxTesterUntrusted/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Security; 3 | 4 | // General Information about an assembly is controlled through the following 5 | // set of attributes. Change these attribute values to modify the information 6 | // associated with an assembly. 7 | [assembly: AssemblyTitle("SandboxTesterUntrusted")] 8 | [assembly: AssemblyDescription("Sample code to show and test assemblies that are not allowed to run in a sandbox")] 9 | [assembly: AssemblyConfiguration("")] 10 | [assembly: AssemblyCompany("Winvision")] 11 | [assembly: AssemblyProduct("SandboxTester")] 12 | [assembly: AssemblyCopyright("Copyright © Winvision 2016")] 13 | [assembly: AssemblyTrademark("")] 14 | [assembly: AssemblyCulture("")] 15 | 16 | [assembly: AssemblyVersion("1.0.0.0")] 17 | [assembly: AssemblyFileVersion("1.0.0.0")] 18 | 19 | [assembly: SecurityRules(SecurityRuleSet.Level2)] 20 | 21 | 22 | -------------------------------------------------------------------------------- /src/SandboxTesterUntrusted/app.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /src/SandboxTesterUntrusted/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /src/development.snk: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Winvision/Sandboxable/bd81e49645833a835a8c05470936ba9ade91f0f1/src/development.snk -------------------------------------------------------------------------------- /src/release.snk.enc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Winvision/Sandboxable/bd81e49645833a835a8c05470936ba9ade91f0f1/src/release.snk.enc --------------------------------------------------------------------------------