add example project

This commit is contained in:
AJ Hoffer 2020-02-21 16:47:15 -05:00
parent a6f239a1cb
commit aafd06b07f
4 changed files with 125 additions and 2 deletions

54
Examples/Examples.csproj Normal file
View file

@ -0,0 +1,54 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" 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>{3A28CF73-F2F5-467B-A7B6-E822A6653203}</ProjectGuid>
<OutputType>Exe</OutputType>
<RootNamespace>Examples</RootNamespace>
<AssemblyName>Examples</AssemblyName>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<Deterministic>true</Deterministic>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<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' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<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="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Lorem.NET\Lorem.NET.csproj">
<Project>{787d3ba7-db6c-4704-b89c-8d91a4392442}</Project>
<Name>Lorem.NET</Name>
</ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>

24
Examples/Program.cs Normal file
View file

@ -0,0 +1,24 @@
using System;
namespace Examples
{
static class Program
{
static void Main(string[] args)
{
Console.WriteLine($"Email: {LoremNET.Generate.Email()}");
Console.WriteLine($"Chance: {LoremNET.Generate.Chance(1, 2)}");
Console.WriteLine($"Words: {LoremNET.Generate.Words(5)}");
Console.WriteLine();
Console.WriteLine("Change the source...");
LoremNET.Source.UpdateSource("Alright stop collaborate and listen ice is back with my brand new invention something grabs a hold of me tightly flow like a harpoon daily and nightly will it ever stop yo I don't know turn off the lights and I'll glow");
Console.WriteLine($"Sentence: {LoremNET.Generate.Sentence(5, 25)}");
Console.WriteLine();
Console.WriteLine("Press any key to exit...");
Console.ReadKey();
}
}
}

View file

@ -0,0 +1,36 @@
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("Examples")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("Examples")]
[assembly: AssemblyCopyright("Copyright © 2020")]
[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("3a28cf73-f2f5-467b-a7b6-e822a6653203")]
// 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")]

View file

@ -1,7 +1,7 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 2013
VisualStudioVersion = 12.0.21005.1
# Visual Studio Version 16
VisualStudioVersion = 16.0.29519.87
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Lorem.NET", "Lorem.NET\Lorem.NET.csproj", "{787D3BA7-DB6C-4704-B89C-8D91A4392442}"
EndProject
@ -10,6 +10,8 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
readme.md = readme.md
EndProjectSection
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Examples", "Examples\Examples.csproj", "{3A28CF73-F2F5-467B-A7B6-E822A6653203}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@ -20,8 +22,15 @@ Global
{787D3BA7-DB6C-4704-B89C-8D91A4392442}.Debug|Any CPU.Build.0 = Debug|Any CPU
{787D3BA7-DB6C-4704-B89C-8D91A4392442}.Release|Any CPU.ActiveCfg = Release|Any CPU
{787D3BA7-DB6C-4704-B89C-8D91A4392442}.Release|Any CPU.Build.0 = Release|Any CPU
{3A28CF73-F2F5-467B-A7B6-E822A6653203}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{3A28CF73-F2F5-467B-A7B6-E822A6653203}.Debug|Any CPU.Build.0 = Debug|Any CPU
{3A28CF73-F2F5-467B-A7B6-E822A6653203}.Release|Any CPU.ActiveCfg = Release|Any CPU
{3A28CF73-F2F5-467B-A7B6-E822A6653203}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {5496E627-F3B6-4620-865C-774C5E0B11E0}
EndGlobalSection
EndGlobal