Skip to content

Commit

Permalink
create .net library for schema
Browse files Browse the repository at this point in the history
  • Loading branch information
Tom Laird-McConnell committed Feb 3, 2017
1 parent f9960dd commit 74110e8
Show file tree
Hide file tree
Showing 28 changed files with 876 additions and 10 deletions.
63 changes: 63 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
###############################################################################
# Set default behavior to automatically normalize line endings.
###############################################################################
* text=auto

###############################################################################
# Set default behavior for command prompt diff.
#
# This is need for earlier builds of msysgit that does not have it on by
# default for csharp files.
# Note: This is only used by command line
###############################################################################
#*.cs diff=csharp

###############################################################################
# Set the merge driver for project and solution files
#
# Merging from the command prompt will add diff markers to the files if there
# are conflicts (Merging from VS is not affected by the settings below, in VS
# the diff markers are never inserted). Diff markers may cause the following
# file extensions to fail to load in VS. An alternative would be to treat
# these files as binary and thus will always conflict and require user
# intervention with every merge. To do so, just uncomment the entries below
###############################################################################
#*.sln merge=binary
#*.csproj merge=binary
#*.vbproj merge=binary
#*.vcxproj merge=binary
#*.vcproj merge=binary
#*.dbproj merge=binary
#*.fsproj merge=binary
#*.lsproj merge=binary
#*.wixproj merge=binary
#*.modelproj merge=binary
#*.sqlproj merge=binary
#*.wwaproj merge=binary

###############################################################################
# behavior for image files
#
# image files are treated as binary by default.
###############################################################################
#*.jpg binary
#*.png binary
#*.gif binary

###############################################################################
# diff behavior for common document formats
#
# Convert binary document formats to text before diffing them. This feature
# is only available from the command line. Turn it on by uncommenting the
# entries below.
###############################################################################
#*.doc diff=astextplain
#*.DOC diff=astextplain
#*.docx diff=astextplain
#*.DOCX diff=astextplain
#*.dot diff=astextplain
#*.DOT diff=astextplain
#*.pdf diff=astextplain
#*.PDF diff=astextplain
#*.rtf diff=astextplain
#*.RTF diff=astextplain
19 changes: 12 additions & 7 deletions AdaptiveCardToolkit.sln
Original file line number Diff line number Diff line change
Expand Up @@ -3,27 +3,32 @@ Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 14
VisualStudioVersion = 14.0.25420.1
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "InteractiveVisualizer", "src\InteractiveVisualizer\InteractiveVisualizer.csproj", "{AE93161A-244A-4410-BC34-466189AEFAF7}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Renderers", "Renderers", "{412460AB-E5CC-4605-8813-7EFFC924D990}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Visualizer", "Visualizer", "{CD8C128A-ABFB-43F8-B86A-8CC06FB0C7AA}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Builders", "Builders", "{CB015F2B-73A6-45E8-9066-77154240257B}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".NET", ".NET", "{38D9E098-DD38-49B7-B861-917FA527D346}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Adaptive.Schema.Net", "builders\.NET\Adaptive.Schema.Net\Adaptive.Schema.Net.csproj", "{692311B2-E537-4700-8EF7-A5F83D90383C}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{AE93161A-244A-4410-BC34-466189AEFAF7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{AE93161A-244A-4410-BC34-466189AEFAF7}.Debug|Any CPU.Build.0 = Debug|Any CPU
{AE93161A-244A-4410-BC34-466189AEFAF7}.Release|Any CPU.ActiveCfg = Release|Any CPU
{AE93161A-244A-4410-BC34-466189AEFAF7}.Release|Any CPU.Build.0 = Release|Any CPU
{692311B2-E537-4700-8EF7-A5F83D90383C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{692311B2-E537-4700-8EF7-A5F83D90383C}.Debug|Any CPU.Build.0 = Debug|Any CPU
{692311B2-E537-4700-8EF7-A5F83D90383C}.Release|Any CPU.ActiveCfg = Release|Any CPU
{692311B2-E537-4700-8EF7-A5F83D90383C}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
{AE93161A-244A-4410-BC34-466189AEFAF7} = {CD8C128A-ABFB-43F8-B86A-8CC06FB0C7AA}
{38D9E098-DD38-49B7-B861-917FA527D346} = {CB015F2B-73A6-45E8-9066-77154240257B}
{692311B2-E537-4700-8EF7-A5F83D90383C} = {38D9E098-DD38-49B7-B861-917FA527D346}
EndGlobalSection
EndGlobal
22 changes: 22 additions & 0 deletions builders/.NET/Adaptive.NET.sln
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 14
VisualStudioVersion = 14.0.25420.1
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Adaptive.Schema.Net", "Adaptive.Schema.Net\Adaptive.Schema.Net.csproj", "{692311B2-E537-4700-8EF7-A5F83D90383C}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{692311B2-E537-4700-8EF7-A5F83D90383C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{692311B2-E537-4700-8EF7-A5F83D90383C}.Debug|Any CPU.Build.0 = Debug|Any CPU
{692311B2-E537-4700-8EF7-A5F83D90383C}.Release|Any CPU.ActiveCfg = Release|Any CPU
{692311B2-E537-4700-8EF7-A5F83D90383C}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal
76 changes: 76 additions & 0 deletions builders/.NET/Adaptive.Schema.Net/Adaptive.Schema.Net.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
<?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>
<MinimumVisualStudioVersion>10.0</MinimumVisualStudioVersion>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{692311B2-E537-4700-8EF7-A5F83D90383C}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Adaptive.Schema.Net</RootNamespace>
<AssemblyName>Adaptive.Schema.Net</AssemblyName>
<DefaultLanguage>en-US</DefaultLanguage>
<FileAlignment>512</FileAlignment>
<ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
<TargetFrameworkProfile>Profile111</TargetFrameworkProfile>
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
</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>
<Compile Include="AdaptiveCard.cs" />
<Compile Include="CardElement.cs" />
<Compile Include="Choice.cs" />
<Compile Include="Column.cs" />
<Compile Include="ColumnGroup.cs" />
<Compile Include="Container.cs" />
<Compile Include="DateInput.cs" />
<Compile Include="Enums.cs" />
<Compile Include="Fact.cs" />
<Compile Include="FactGroup.cs" />
<Compile Include="Image.cs" />
<Compile Include="ImageGallery.cs" />
<Compile Include="Input.cs" />
<Compile Include="MultichoiceInput.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Seperator.cs" />
<Compile Include="TextBlock.cs" />
<Compile Include="TextInput.cs" />
<Compile Include="ToggleInput.cs" />
<Compile Include="TypedElementConverter.cs" />
<Compile Include="TypedElement.cs" />
</ItemGroup>
<ItemGroup>
<Reference Include="Newtonsoft.Json, Version=9.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<HintPath>..\..\..\packages\Newtonsoft.Json.9.0.1\lib\portable-net45+wp80+win8+wpa81\Newtonsoft.Json.dll</HintPath>
<Private>True</Private>
</Reference>
</ItemGroup>
<ItemGroup>
<None Include="packages.config" />
</ItemGroup>
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\Portable\$(TargetFrameworkVersion)\Microsoft.Portable.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>
20 changes: 20 additions & 0 deletions builders/.NET/Adaptive.Schema.Net/AdaptiveCard.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Adaptive.Schema.Net
{
/// <summary>
/// Adaptive card which has flexible container
/// </summary>
public class AdaptiveCard : TypedElement
{
public AdaptiveCard() { }

public string Speak { get; set; }

public Container Body { get; set; }
}
}
35 changes: 35 additions & 0 deletions builders/.NET/Adaptive.Schema.Net/CardElement.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Adaptive.Schema.Net
{
/// <summary>
/// Base class for all elements in a container
/// </summary>
public class CardElement : TypedElement
{
public CardElement() : base()
{
}

/// <summary>
/// SSML fragment for spoken interaction
/// </summary>
public string Speak { get; set; }

/// <summary>
/// Size hint for the element
/// </summary>
public Size Size { get; set; } = Size.Auto;

/// <summary>
/// Horizontal alignment for element
/// </summary>
public HorizontalAlignment HorizontalAlignment { get; set; } = HorizontalAlignment.Left;
}
}


33 changes: 33 additions & 0 deletions builders/.NET/Adaptive.Schema.Net/Choice.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Adaptive.Schema.Net
{
/// <summary>
/// Choice as part of a MultichoiceInput element
/// </summary>
public class Choice
{
public Choice()
{ }

/// <summary>
/// Display text for the choice
/// </summary>
public string Display { get; set; }

/// <summary>
/// Internal value which will be collected as input if the choice is selected
/// </summary>
public string Value { get; set; }

/// <summary>
/// (OPTIONAL) Speech description of the choice
/// </summary>
// ISSUE: I think we need speak here...
public string Speak { get; set; }
}
}
19 changes: 19 additions & 0 deletions builders/.NET/Adaptive.Schema.Net/Column.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Adaptive.Schema.Net
{
/// <summary>
/// A column container inside of a columngroup
/// </summary>
public class Column : Container
{
public Column() { }

// ISSUE Number? I thought we had "Auto" and stuff..
public int Weight { get; set; }
}
}
19 changes: 19 additions & 0 deletions builders/.NET/Adaptive.Schema.Net/ColumnGroup.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Adaptive.Schema.Net
{
/// <summary>
/// A container for grouping columns together
/// </summary>
public class ColumnGroup : CardElement
{
public ColumnGroup() { }

// ISSUE? Should this be called columns, it only can take Column elements, right?
public List<Column> Items { get; set; } = new List<Column>();
}
}
31 changes: 31 additions & 0 deletions builders/.NET/Adaptive.Schema.Net/Container.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Adaptive.Schema.Net
{
/// <summary>
/// Container for a collection of elements
/// </summary>
public class Container : TypedElement
{
public Container()
{ }

// Issue: Should this be Elements?
public List<CardElement> Items { get; set; } = new List<CardElement>();

/// <summary>
/// Image to use for the background of a card
/// </summary>
public string BackgroundImageUrl { get; set; }

/// <summary>
/// Background color to use for the card
/// </summary>
// ISSUE: Why is this a string?
public string BackgroundColor { get; set; }
}
}
24 changes: 24 additions & 0 deletions builders/.NET/Adaptive.Schema.Net/DateInput.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Adaptive.Schema.Net
{

/// <summary>
/// Input control for date
/// </summary>
public class DateInput : Input
{
public DateInput()
{
this.Size = Size.Medium;
}

public bool IncludeTime { get; set; }

// ISSUE: WE NEED MORE PARAMETERS HERE
}
}
Loading

0 comments on commit 74110e8

Please sign in to comment.