-
Notifications
You must be signed in to change notification settings - Fork 49
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 5acd168
Showing
989 changed files
with
11,418 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# Auto detect text files and perform LF normalization | ||
* text=auto |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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>{294C8409-1203-44AA-8360-B4DE5B8382EE}</ProjectGuid> | ||
<OutputType>Exe</OutputType> | ||
<RootNamespace>AbstractFactoryPattern</RootNamespace> | ||
<AssemblyName>AbstractFactoryPattern</AssemblyName> | ||
<TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion> | ||
<FileAlignment>512</FileAlignment> | ||
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects> | ||
</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> | ||
<UseVSHostingProcess>true</UseVSHostingProcess> | ||
</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.Net.Http" /> | ||
<Reference Include="System.Xml" /> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<Compile Include="Program.cs" /> | ||
<Compile Include="Properties\AssemblyInfo.cs" /> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<None Include="App.config" /> | ||
<None Include="ClassDiagram1.cd" /> | ||
</ItemGroup> | ||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> | ||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
<?xml version="1.0" encoding="utf-8" ?> | ||
<configuration> | ||
<startup> | ||
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5.2" /> | ||
</startup> | ||
</configuration> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,83 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<ClassDiagram MajorVersion="1" MinorVersion="1"> | ||
<Class Name="AbstractFactoryPattern.WildDog" Collapsed="true" BaseTypeListCollapsed="true"> | ||
<Position X="2.5" Y="4" Width="1.5" /> | ||
<TypeIdentifier> | ||
<HashCode>AAAAAAAAAAAAAAAAAAAAAAAAAAAAIAAAAAAAAAAAAAQ=</HashCode> | ||
<FileName>Program.cs</FileName> | ||
</TypeIdentifier> | ||
<Lollipop Position="0.2" /> | ||
</Class> | ||
<Class Name="AbstractFactoryPattern.WildTiger" Collapsed="true" BaseTypeListCollapsed="true"> | ||
<Position X="2.5" Y="1.75" Width="1.5" /> | ||
<TypeIdentifier> | ||
<HashCode>AAAAAAAAAAAAAAAAAAAAAAAAAAAAIAAAAAAAAAAAAAQ=</HashCode> | ||
<FileName>Program.cs</FileName> | ||
</TypeIdentifier> | ||
<Lollipop Position="0.2" /> | ||
</Class> | ||
<Class Name="AbstractFactoryPattern.PetDog" Collapsed="true" BaseTypeListCollapsed="true"> | ||
<Position X="0.5" Y="4" Width="1.5" /> | ||
<TypeIdentifier> | ||
<HashCode>AAAAAAAAAAAAAAAAAAAAAAAAAAAAIAAAAAAAAAAAAAQ=</HashCode> | ||
<FileName>Program.cs</FileName> | ||
</TypeIdentifier> | ||
<Lollipop Position="0.2" /> | ||
</Class> | ||
<Class Name="AbstractFactoryPattern.PetTiger" Collapsed="true" BaseTypeListCollapsed="true"> | ||
<Position X="0.5" Y="1.75" Width="1.5" /> | ||
<TypeIdentifier> | ||
<HashCode>AAAAAAAAAAAAAAAAAAAAAAAAAAAAIAAAAAAAAAAAAAQ=</HashCode> | ||
<FileName>Program.cs</FileName> | ||
</TypeIdentifier> | ||
<Lollipop Position="0.2" /> | ||
</Class> | ||
<Class Name="AbstractFactoryPattern.WildAnimalFactory" Collapsed="true" BaseTypeListCollapsed="true"> | ||
<Position X="6" Y="1.75" Width="1.75" /> | ||
<TypeIdentifier> | ||
<HashCode>AAAAAAAAAAAAAAAAAAAAAACAAAAAAAAAAAAAAEAAAAA=</HashCode> | ||
<FileName>Program.cs</FileName> | ||
</TypeIdentifier> | ||
<Lollipop Position="0.2" /> | ||
</Class> | ||
<Class Name="AbstractFactoryPattern.PetAnimalFactory" Collapsed="true" BaseTypeListCollapsed="true"> | ||
<Position X="8" Y="1.75" Width="1.5" /> | ||
<TypeIdentifier> | ||
<HashCode>AAAAAAAAAAAAAAAAAAAAAACAAAAAAAAAAAAAAEAAAAA=</HashCode> | ||
<FileName>Program.cs</FileName> | ||
</TypeIdentifier> | ||
<Lollipop Position="0.2" /> | ||
</Class> | ||
<Class Name="AbstractFactoryPattern.Program" Collapsed="true"> | ||
<Position X="4.25" Y="0.5" Width="1.5" /> | ||
<TypeIdentifier> | ||
<HashCode>AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAA=</HashCode> | ||
<FileName>Program.cs</FileName> | ||
</TypeIdentifier> | ||
</Class> | ||
<Interface Name="AbstractFactoryPattern.IDog" Collapsed="true"> | ||
<Position X="1.5" Y="3" Width="1.5" /> | ||
<TypeIdentifier> | ||
<HashCode>AAAAAAAAAAAAAAAAAAAAAAAAAAAAIAAAAAAAAAAAAAQ=</HashCode> | ||
<FileName>Program.cs</FileName> | ||
</TypeIdentifier> | ||
</Interface> | ||
<Interface Name="AbstractFactoryPattern.ITiger" Collapsed="true"> | ||
<Position X="1.5" Y="0.5" Width="1.5" /> | ||
<TypeIdentifier> | ||
<HashCode>AAAAAAAAAAAAAAAAAAAAAAAAAAAAIAAAAAAAAAAAAAQ=</HashCode> | ||
<FileName>Program.cs</FileName> | ||
</TypeIdentifier> | ||
</Interface> | ||
<Interface Name="AbstractFactoryPattern.IAnimalFactory" Collapsed="true"> | ||
<Position X="7" Y="0.5" Width="1.5" /> | ||
<Compartments> | ||
<Compartment Name="Methods" Collapsed="true" /> | ||
</Compartments> | ||
<TypeIdentifier> | ||
<HashCode>AAAAAAAAAAAAAAAAAAAAAACAAAAAAAAAAAAAAEAAAAA=</HashCode> | ||
<FileName>Program.cs</FileName> | ||
</TypeIdentifier> | ||
</Interface> | ||
<Font Name="Segoe UI" Size="9" /> | ||
</ClassDiagram> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,131 @@ | ||
using System; | ||
|
||
|
||
namespace AbstractFactoryPattern | ||
{ | ||
public interface IDog | ||
{ | ||
void Speak(); | ||
void Action(); | ||
} | ||
|
||
public interface ITiger | ||
{ | ||
void Speak(); | ||
void Action(); | ||
} | ||
|
||
#region Wild Animal collections | ||
class WildDog : IDog | ||
{ | ||
public void Speak() | ||
{ | ||
Console.WriteLine("Wild Dog says: Bow-Wow."); | ||
} | ||
public void Action() | ||
{ | ||
Console.WriteLine("Wild Dogs prefer to roam freely in jungles.\n"); | ||
} | ||
} | ||
class WildTiger : ITiger | ||
{ | ||
public void Speak() | ||
{ | ||
Console.WriteLine("Wild Tiger says: Halum."); | ||
} | ||
public void Action() | ||
{ | ||
Console.WriteLine("Wild Tigers prefer hunting in jungles.\n"); | ||
} | ||
} | ||
#endregion | ||
|
||
#region Pet Animal collections | ||
class PetDog : IDog | ||
{ | ||
public void Speak() | ||
{ | ||
Console.WriteLine("Pet Dog says: Bow-Wow."); | ||
} | ||
public void Action() | ||
{ | ||
Console.WriteLine("Pet Dogs prefer to stay at home.\n"); | ||
} | ||
} | ||
class PetTiger : ITiger | ||
{ | ||
public void Speak() | ||
{ | ||
Console.WriteLine("Pet Tiger says: Halum."); | ||
} | ||
public void Action() | ||
{ | ||
Console.WriteLine("Pet Tigers play in an animal circus.\n"); | ||
} | ||
} | ||
#endregion | ||
//Abstract Factory | ||
public interface IAnimalFactory | ||
{ | ||
IDog GetDog(); | ||
ITiger GetTiger(); | ||
} | ||
//Concrete Factory-Wild Animal Factory | ||
public class WildAnimalFactory : IAnimalFactory | ||
{ | ||
public IDog GetDog() | ||
{ | ||
return new WildDog(); | ||
} | ||
|
||
public ITiger GetTiger() | ||
{ | ||
return new WildTiger(); | ||
} | ||
} | ||
//Concrete Factory-Pet Animal Factory | ||
public class PetAnimalFactory : IAnimalFactory | ||
{ | ||
public IDog GetDog() | ||
{ | ||
return new PetDog(); | ||
} | ||
|
||
public ITiger GetTiger() | ||
{ | ||
return new PetTiger(); | ||
} | ||
} | ||
|
||
class Program | ||
{ | ||
static void Main(string[] args) | ||
{ | ||
Console.WriteLine("***Abstract Factory Pattern Demo***\n"); | ||
|
||
//Making a wild dog through WildAnimalFactory | ||
IAnimalFactory wildAnimalFactory = new WildAnimalFactory(); | ||
IDog wildDog = wildAnimalFactory.GetDog(); | ||
wildDog.Speak(); | ||
wildDog.Action(); | ||
//Making a wild tiger through WildAnimalFactory | ||
ITiger wildTiger = wildAnimalFactory.GetTiger(); | ||
wildTiger.Speak(); | ||
wildTiger.Action(); | ||
|
||
Console.WriteLine("******************"); | ||
|
||
//Making a pet dog through PetAnimalFactory | ||
IAnimalFactory petAnimalFactory = new PetAnimalFactory(); | ||
IDog petDog = petAnimalFactory.GetDog(); | ||
petDog.Speak(); | ||
petDog.Action(); | ||
//Making a pet tiger through PetAnimalFactory | ||
ITiger petTiger = petAnimalFactory.GetTiger(); | ||
petTiger.Speak(); | ||
petTiger.Action(); | ||
|
||
Console.ReadLine(); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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("AbstractFactoryPattern")] | ||
[assembly: AssemblyDescription("")] | ||
[assembly: AssemblyConfiguration("")] | ||
[assembly: AssemblyCompany("")] | ||
[assembly: AssemblyProduct("AbstractFactoryPattern")] | ||
[assembly: AssemblyCopyright("Copyright © 2018")] | ||
[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("294c8409-1203-44aa-8360-b4de5b8382ee")] | ||
|
||
// 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")] |
Binary file not shown.
6 changes: 6 additions & 0 deletions
6
AbstractFactoryPattern/bin/Debug/AbstractFactoryPattern.exe.config
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
<?xml version="1.0" encoding="utf-8" ?> | ||
<configuration> | ||
<startup> | ||
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5.2" /> | ||
</startup> | ||
</configuration> |
Binary file not shown.
1 change: 1 addition & 0 deletions
1
AbstractFactoryPattern/obj/Debug/AbstractFactoryPattern.csproj.CoreCompileInputs.cache
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
1184f5fc95fc1a5383b592f4472dab6d640af1d3 |
7 changes: 7 additions & 0 deletions
7
AbstractFactoryPattern/obj/Debug/AbstractFactoryPattern.csproj.FileListAbsolute.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
C:\Feluda_June12,2017Onwards\MyPrograms\CPPprogs\ConsoleApplication1\AbstractFactoryPattern\bin\Debug\AbstractFactoryPattern.exe.config | ||
C:\Feluda_June12,2017Onwards\MyPrograms\CPPprogs\ConsoleApplication1\AbstractFactoryPattern\bin\Debug\AbstractFactoryPattern.exe | ||
C:\Feluda_June12,2017Onwards\MyPrograms\CPPprogs\ConsoleApplication1\AbstractFactoryPattern\bin\Debug\AbstractFactoryPattern.pdb | ||
C:\Feluda_June12,2017Onwards\MyPrograms\CPPprogs\ConsoleApplication1\AbstractFactoryPattern\obj\Debug\AbstractFactoryPattern.csprojResolveAssemblyReference.cache | ||
C:\Feluda_June12,2017Onwards\MyPrograms\CPPprogs\ConsoleApplication1\AbstractFactoryPattern\obj\Debug\AbstractFactoryPattern.exe | ||
C:\Feluda_June12,2017Onwards\MyPrograms\CPPprogs\ConsoleApplication1\AbstractFactoryPattern\obj\Debug\AbstractFactoryPattern.pdb | ||
C:\Feluda_June12,2017Onwards\MyPrograms\CPPprogs\ConsoleApplication1\AbstractFactoryPattern\obj\Debug\AbstractFactoryPattern.csproj.CoreCompileInputs.cache |
Binary file added
BIN
+9.62 KB
AbstractFactoryPattern/obj/Debug/AbstractFactoryPattern.csprojResolveAssemblyReference.cache
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
367a899032cefccbff740e0133173d3681f6634d |
Binary file added
BIN
+6.85 KB
AbstractFactoryPattern/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache
Binary file not shown.
Empty file added
0
...ctFactoryPattern/obj/Debug/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs
Empty file.
Empty file added
0
...ctFactoryPattern/obj/Debug/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs
Empty file.
Empty file added
0
...ctFactoryPattern/obj/Debug/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs
Empty file.
1 change: 1 addition & 0 deletions
1
AbstractFactoryPattern/obj/Release/AbstractFactoryPattern.csproj.CoreCompileInputs.cache
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
1184f5fc95fc1a5383b592f4472dab6d640af1d3 |
Empty file added
0
...FactoryPattern/obj/Release/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs
Empty file.
Empty file added
0
...FactoryPattern/obj/Release/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs
Empty file.
Empty file added
0
...FactoryPattern/obj/Release/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs
Empty file.
Oops, something went wrong.