Skip to content

Commit

Permalink
Initial Commit
Browse files Browse the repository at this point in the history
  • Loading branch information
Kolahzary committed Oct 20, 2018
1 parent dc2e6cf commit 04d7203
Show file tree
Hide file tree
Showing 22 changed files with 797 additions and 0 deletions.
15 changes: 15 additions & 0 deletions Exceptions/ApiException.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
using Kavenegar.Core.Models.Enums;

namespace Kavenegar.Core.Exceptions
{
public class ApiException : KavenegarException
{
public MetaCode Code { get; protected set; }

public ApiException(string message, int code)
: base(message)
{
Code = (MetaCode)code;
}
}
}
10 changes: 10 additions & 0 deletions Exceptions/BaseException.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
namespace Kavenegar.Core.Exceptions
{
public class KavenegarException : System.Exception
{
public KavenegarException(string message)
: base(message)
{
}
}
}
13 changes: 13 additions & 0 deletions Exceptions/HttpException.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
namespace Kavenegar.Core.Exceptions
{
public class HttpException : KavenegarException
{
public int Code { get; private set; }

public HttpException(string message, int code)
: base(message)
{
Code = code;
}
}
}
28 changes: 28 additions & 0 deletions Kavenegar.NetCore.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>netcoreapp2.0;netcoreapp2.1;netstandard1.2;netstandard1.3;netstandard1.4;netstandard1.5;netstandard1.6;netstandard2.0;</TargetFrameworks>
<Description>A cross-platform library for Kavenegar SMS Provider; written in C#, partially ported from github.com/mberneti/Kavenegar.Core</Description>
<AssemblyName>Kavenegar.NetCore</AssemblyName>
<RootNamespace>Kavenegar.NetCore</RootNamespace>
<AssemblyTitle>Kavenegar.NetCore</AssemblyTitle>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>

<PackageId>Kavenegar.NetCore</PackageId>
<PackageTags>Kavenegar Core Kavenegar.NetCore KavenegarNetCore</PackageTags>
<PackageIconUrl>https://s.gravatar.com/avatar/6ad8aec9e2197ae57473c114a04b2145?s=128</PackageIconUrl>
<PackageProjectUrl>https://github.com/kolahzary/Kavenegar.NetCore</PackageProjectUrl>

<OutputType>Library</OutputType>
<RestorePackages>true</RestorePackages>
<BuildPackage>true</BuildPackage>
<Authors>Shadman Kolahzary (shadman.ko@gmail.com)</Authors>
<RepositoryType>git</RepositoryType>
<RepositoryUrl>https://github.com/kolahzary/Kavenegar.NetCore</RepositoryUrl>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Newtonsoft.Json" Version="11.0.2" />
</ItemGroup>

</Project>
Loading

0 comments on commit 04d7203

Please sign in to comment.