You're Invited:Meet the Socket Team at RSAC and BSidesSF 2026, March 23–26.RSVP
Socket
Book a DemoSign in
Socket

cloud.storage

Package Overview
Dependencies
Maintainers
2
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cloud.storage - nuget Package Compare versions

Package was removed
Sorry, it seems this package was removed from the registry
Comparing version
0.0.2-alpha
to
0.0.3-alpha
lib/net45/Cloud.Storage.dll

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

+1
-1

@@ -1,1 +0,1 @@

<?xml version="1.0" encoding="utf-8"?><Types xmlns="http://schemas.openxmlformats.org/package/2006/content-types"><Default Extension="rels" ContentType="application/vnd.openxmlformats-package.relationships+xml" /><Default Extension="nuspec" ContentType="application/octet" /><Default Extension="csproj" ContentType="application/octet" /><Default Extension="cs" ContentType="application/octet" /><Default Extension="dll" ContentType="application/octet" /><Default Extension="pdb" ContentType="application/octet" /><Default Extension="txt" ContentType="application/octet" /><Default Extension="cache" ContentType="application/octet" /><Default Extension="psmdcp" ContentType="application/vnd.openxmlformats-package.core-properties+xml" /></Types>
<?xml version="1.0" encoding="utf-8"?><Types xmlns="http://schemas.openxmlformats.org/package/2006/content-types"><Default Extension="rels" ContentType="application/vnd.openxmlformats-package.relationships+xml" /><Default Extension="nuspec" ContentType="application/octet" /><Default Extension="dll" ContentType="application/octet" /><Default Extension="psmdcp" ContentType="application/vnd.openxmlformats-package.core-properties+xml" /></Types>

@@ -5,3 +5,3 @@ <?xml version="1.0"?>

<id>Cloud.Storage</id>
<version>0.0.2-alpha</version>
<version>0.0.3-alpha</version>
<title>Cloud.Storage.Azure</title>

@@ -16,3 +16,4 @@ <authors>Ben Hanson</authors>

<copyright>Copyright 2015</copyright>
<dependencies />
</metadata>
</package>

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

using System;
using System.IO;
using System.Threading.Tasks;
namespace Cloud.Storage.Blobs
{
public interface IBlob
{
Task<bool> CheckIfExists();
Task<byte[]> GetData(string leaseId = null);
Task UploadData(byte[] data, string leaseId = null);
Task UploadText(string text, string leaseId = null);
Task<byte[]> DownloadData(string leaseId = null);
Task<string> DownloadText(string leaseId = null);
Task UploadFromStream(Stream stream, string leaseId = null);
Task DeleteIfExists(string leaseId = null);
string AquireLease(TimeSpan? lockLength);
TimeSpan BreakLease(string leaseId);
Task AppendText(string text, string leaseId = null);
Task AppendData(byte[] data, string leaseId = null);
}
}
using System.Threading.Tasks;
namespace Cloud.Storage.Blobs
{
public interface IBlobStorageClient
{
Task<IContainer> GetContainer(string containerName, bool createIfNotExists = false);
}
}
namespace Cloud.Storage.Blobs
{
public interface IContainer
{
IBlob GetBlob(string uri);
}
}
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{09620A68-5435-47C1-B188-C59F77CAAF12}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Cloud.Storage</RootNamespace>
<AssemblyName>Cloud.Storage</AssemblyName>
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="Blobs\IBlob.cs" />
<Compile Include="Blobs\IBlobStorageClient.cs" />
<Compile Include="Blobs\IContainer.cs" />
<Compile Include="Extensions.cs" />
<Compile Include="IStorageClient.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Queues\IMessage.cs" />
<Compile Include="Queues\IQueue.cs" />
<Compile Include="Queues\IQueueStorageClient.cs" />
<Compile Include="Tables\IRow.cs" />
<Compile Include="Tables\ITable.cs" />
<Compile Include="Tables\ITableStorageClient.cs" />
<Compile Include="Tables\RowReference.cs" />
<Compile Include="Utilities\SequentialGuid.cs" />
</ItemGroup>
<ItemGroup>
<None Include="Cloud.Storage.nuspec" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
</Project>
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Cloud.Storage
{
public static class Extensions
{
public static string ToStringComparableValue(this Int64 integer)
{
var sb = new StringBuilder();
var integerString = integer.ToString();
var integerStringLength = integerString.Length;
for (int i = 0; i < (MaxChars - integerStringLength); ++i)
{
sb.Append("0");
}
sb.Append(integerString);
return sb.ToString();
}
private static int MaxChars = Int64.MaxValue.ToString().Length;
}
}
using Cloud.Storage.Blobs;
using Cloud.Storage.Queues;
using Cloud.Storage.Tables;
namespace Cloud.Storage
{
public interface IStorageClient
{
IBlobStorageClient Blobs { get; }
IQueueStorageClient Queues { get; }
ITableStorageClient Tables { get; }
}
}
C:\Code\CloudStorage\src\Cloud.Storage\bin\Debug\Cloud.Storage.dll
C:\Code\CloudStorage\src\Cloud.Storage\bin\Debug\Cloud.Storage.pdb
C:\Code\CloudStorage\src\Cloud.Storage\obj\Debug\Cloud.Storage.dll
C:\Code\CloudStorage\src\Cloud.Storage\obj\Debug\Cloud.Storage.pdb
C:\Code\GitHub\Cloud.Storage\src\Cloud.Storage\bin\Debug\Cloud.Storage.dll
C:\Code\GitHub\Cloud.Storage\src\Cloud.Storage\bin\Debug\Cloud.Storage.pdb
C:\Code\GitHub\Cloud.Storage\src\Cloud.Storage\obj\Debug\Cloud.Storage.dll
C:\Code\GitHub\Cloud.Storage\src\Cloud.Storage\obj\Debug\Cloud.Storage.pdb
C:\Code\GitHub\Cloud.Storage\src\Cloud.Storage\obj\Debug\Cloud.Storage.csprojResolveAssemblyReference.cache

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

C:\Code\GitHub\Cloud.Storage\src\Cloud.Storage\bin\Release\Cloud.Storage.dll
C:\Code\GitHub\Cloud.Storage\src\Cloud.Storage\bin\Release\Cloud.Storage.pdb
C:\Code\GitHub\Cloud.Storage\src\Cloud.Storage\obj\Release\Cloud.Storage.csprojResolveAssemblyReference.cache
C:\Code\GitHub\Cloud.Storage\src\Cloud.Storage\obj\Release\Cloud.Storage.dll
C:\Code\GitHub\Cloud.Storage\src\Cloud.Storage\obj\Release\Cloud.Storage.pdb

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("Cloud.Storage")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("Cloud.Storage")]
[assembly: AssemblyCopyright("Copyright © 2015")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]
// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("09620a68-5435-47c1-b188-c59f77caaf12")]
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
namespace Cloud.Storage.Queues
{
public interface IMessage
{
}
}
using System;
using System.Collections.Generic;
using System.Threading.Tasks;
namespace Cloud.Storage.Queues
{
public interface IQueue
{
IMessage CreateMessage(string messageContents);
IMessage CreateMessage(byte[] messageContents);
Task AddMessage(IMessage message);
int GetApproximateMessageCount();
Task Clear();
Task<IMessage> PeekNextMessage();
Task<List<IMessage>> PeekMessages(int numMessages);
Task<IMessage> GetNextMessage(TimeSpan? visibilityTimeout = null);
Task<List<IMessage>> GetMessages(int numMessages, TimeSpan? visibilityTimeout = null);
}
}
using System.Threading.Tasks;
namespace Cloud.Storage.Queues
{
public interface IQueueStorageClient
{
Task<IQueue> GetQueue(string queueName, bool createIfNotExists = false);
IMessage CreateMessage(string messageContents);
IMessage CreateMessage(byte[] messageContents);
}
}

Sorry, the diff of this file is not supported yet

namespace Cloud.Storage.Tables
{
public interface IRow
{
string PrimaryKey { get; }
string SecondaryKey { get; }
}
public interface IRow<T> : IRow
{
T Data { get; set; }
}
}
using System;
using System.Collections.Generic;
using System.Threading.Tasks;
namespace Cloud.Storage.Tables
{
public interface ITable
{
string Name { get; }
bool Exists();
//Task<List<T>> GetAllRows<T>()
// where T : class, IRow, new();
//Task<T> GetRow<T>(string primaryKey, string secondaryKey)
// where T : class, IRow, new();
//Task<List<T>> GetRowsByPrimaryKey<T>(string primaryKey)
// where T : class, IRow, new();
//Task InsertOrUpdateRow<T>(T row, bool forceOverride = false)
// where T : class, IRow, new();
//Task InsertOrUpdateRows<T>(List<T> rows, bool forceOverride = false)
// where T : class, IRow, new();
//Task DeleteRow<T>(T row)
// where T : class, IRow, new();
//Task DeleteRow(string primaryKey, string secondaryKey);
//Task DeleteRow(RowReference row);
//Task DeleteRows<T>(List<T> rows)
// where T : class, IRow, new();
//Task DeleteRows(List<RowReference> rows);
}
}
using System.Threading.Tasks;
namespace Cloud.Storage.Tables
{
public interface ITableStorageClient
{
Task<ITable> GetTable(string tableName, bool createIfNotExists = false);
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Cloud.Storage.Tables
{
public class RowReference
: IRow
{
public RowReference(string primaryKey, string secondaryKey)
{
PrimaryKey = primaryKey;
SecondaryKey = secondaryKey;
}
public string PrimaryKey { get; private set; }
public string SecondaryKey { get; private set; }
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Cloud.Storage.Utilities
{
public class SequentialGuid
{
Guid _CurrentGuid;
public Guid CurrentGuid
{
get { return _CurrentGuid; }
}
public SequentialGuid()
{
_CurrentGuid = Guid.NewGuid();
}
public SequentialGuid(Guid previousGuid)
{
_CurrentGuid = previousGuid;
}
public static SequentialGuid operator ++(SequentialGuid sequentialGuid)
{
byte[] bytes = sequentialGuid._CurrentGuid.ToByteArray();
for (int mapIndex = 0; mapIndex < 16; mapIndex++)
{
int bytesIndex = SqlOrderMap[mapIndex];
bytes[bytesIndex]++;
if (bytes[bytesIndex] != 0)
{
break; // No need to increment more significant bytes
}
}
sequentialGuid._CurrentGuid = new Guid(bytes);
return sequentialGuid;
}
private static int[] _SqlOrderMap = null;
private static int[] SqlOrderMap
{
get
{
if (_SqlOrderMap == null)
{
_SqlOrderMap = new int[16] { 3, 2, 1, 0, 5, 4, 7, 6, 9, 8, 15, 14, 13, 12, 11, 10 };
// 3 - the least significant byte in Guid ByteArray [for SQL Server ORDER BY clause]
// 10 - the most significant byte in Guid ByteArray [for SQL Server ORDERY BY clause]
}
return _SqlOrderMap;
}
}
}
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet