Skip to content

Commit

Permalink
fixed merge
Browse files Browse the repository at this point in the history
  • Loading branch information
chopan123 committed Feb 4, 2025
1 parent 095fadf commit 5515785
Show file tree
Hide file tree
Showing 9 changed files with 242 additions and 10 deletions.
89 changes: 88 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,91 @@ yarn-error.log*
.DS_Store
*.pem

*storybook.log
*storybook.log

# .NET Core build folders
bin/
obj/

# Visual Studio files
.vs/
*.user
*.userosscache
*.sln.docstates
*.userprefs

# Build results
[Dd]ebug/
[Dd]ebugPublic/
[Rr]elease/
[Rr]eleases/
x64/
x86/
build/
bld/
[Bb]in/
[Oo]bj/
[Oo]ut/
msbuild.log
msbuild.err
msbuild.wrn

# Visual Studio Code
.vscode/*
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json

# Visual Studio for Mac
.idea/
*.sln.iml

# User-specific files
*.suo
*.user
*.userosscache
*.sln.docstates

# NuGet
*.nuget.props
*.nuget.targets
packages/dotnet-sdk/packages/

# MSTest test Results
[Tt]est[Rr]esult*/
[Bb]uild[Ll]og.*

# .NET Core
project.lock.json
project.fragment.lock.json
artifacts/

# Files built by Visual Studio
*_i.c
*_p.c
*_h.h
*.ilk
*.meta
*.obj
*.iobj
*.pch
*.pdb
*.ipdb
*.pgc
*.pgd
*.rsp
*.sbr
*.tlb
*.tli
*.tlh
*.tmp
*.tmp_proj
*_wpftmp.csproj
*.log
*.vspscc
*.vssscc
.builds
*.pidb
*.svclog
*.scc
25 changes: 16 additions & 9 deletions DeFindex.code-workspace
Original file line number Diff line number Diff line change
Expand Up @@ -2,36 +2,43 @@
"folders": [
{
"name": "Root",
"path": "./",
"path": "./"
},
{
"name": "Contracts",
"path": "apps/contracts",
"path": "apps/contracts"
},
{
"name": "Dapp",
"path": "apps/dapp",
"path": "apps/dapp"
},
{
"name": "Docs",
"path": "apps/docs",
"path": "apps/docs"
},
{
"name": "Landing",
"path": "apps/landing",
"path": "apps/landing"
},
{
"name": "DeFindex Dart SDK",
"path": "packages/defindex-dart-sdk",
"path": "packages/defindex-dart-sdk"
},
{
"name": "DeFindex SDK",
"path": "packages/defindex-sdk",
"name": "DeFindex JS SDK",
"path": "packages/defindex-sdk"
},
{
"name": "DeFindex .NET SDK",
"path": "packages/dotnet-sdk"
},
{
"name": "DeFindex UI",
"path": "packages/ui",
"path": "packages/ui"
},
{
"path": "../../beans-bv/dotnet-stellar-sdk"
}
],
"settings": {
"files.exclude": {
Expand Down
35 changes: 35 additions & 0 deletions packages/dotnet-sdk/Program.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
using System;
using System.Threading;
using stellar_dotnet_sdk;

class Program
{
// var server = new Server("https://horizon-testnet.stellar.org");

static void Main(string[] args)
{
// var account = GetAccountInfo("GCEZQZLDSZQYHJ7ZDWRHTK6V4RR4W2QZ5DKK2UY62VVQZJ53L2UQ");
// Console.WriteLine(account);

for (int i = 0; i < 5; i++)
{
Console.WriteLine($"Test output {i}");
Thread.Sleep(1000); // Wait 1 second between outputs
}
}

// // Example: Get account information
// public async Task<AccountResponse> GetAccountInfo(string accountId)
// {
// try
// {
// var account = await server.Accounts.Account(accountId);
// return account;
// }
// catch (Exception ex)
// {
// Console.WriteLine($"Error getting account info: {ex.Message}");
// throw;
// }
// }
}
9 changes: 9 additions & 0 deletions packages/dotnet-sdk/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# DeFindex .NET SDK

.NET SDK for the DeFindex protocol.

## Installation

## Usage

Basic usage examples will go here.
33 changes: 33 additions & 0 deletions packages/dotnet-sdk/dotnet-sdk.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net8.0</TargetFramework>
<RootNamespace>dotnet_sdk</RootNamespace>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<StartupObject>Program</StartupObject>

<!-- Package Information -->
<PackageId>DeFindex.Sdk</PackageId>
<Version>0.1.0</Version>
<Authors>paltalabs</Authors>
<Company>paltalabs</Company>
<Description>DeFindex Core Library</Description>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<PackageReadmeFile>README.md</PackageReadmeFile>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.8.0" />
<PackageReference Include="stellar-dotnet-sdk" Version="13.0.0" />
<PackageReference Include="xunit" Version="2.6.2" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.5.4" />
<PackageReference Include="coverlet.collector" Version="6.0.0" />
</ItemGroup>

<ItemGroup>
<None Include="README.md" Pack="true" PackagePath="\" />
</ItemGroup>

</Project>
7 changes: 7 additions & 0 deletions packages/dotnet-sdk/src/Interfaces/IDefindexSdk.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
namespace DeFindex.Sdk.Interfaces;

public interface IDefindexSdk
{
Task<bool> InitializeAsync();
// Add more interface methods as needed
}
15 changes: 15 additions & 0 deletions packages/dotnet-sdk/src/Services/DefindexSdk.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
namespace DeFindex.Sdk.Services;

using System;
using DeFindex.Sdk.Interfaces;

public class DefindexSdk : IDefindexSdk
{
public async Task<bool> InitializeAsync()
{
Console.WriteLine("Starting SDK initialization...");
// Implementation here
Console.WriteLine("SDK initialization completed!");
return true;
}
}
12 changes: 12 additions & 0 deletions packages/dotnet-sdk/tests/UnitTest1.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
using Xunit;

namespace tests;

public class UnitTest1
{
[Fact]
public void Test1()
{
Assert.True(true);
}
}
27 changes: 27 additions & 0 deletions packages/dotnet-sdk/tests/tests.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>

<IsPackable>false</IsPackable>
<IsTestProject>true</IsTestProject>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="coverlet.collector" Version="6.0.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.8.0" />
<PackageReference Include="xunit" Version="2.6.2" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.5.4" />
</ItemGroup>

<ItemGroup>
<Using Include="Xunit" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="../dotnet-sdk.csproj" />
</ItemGroup>

</Project>

0 comments on commit 5515785

Please sign in to comment.