├── .gitattributes
├── .gitignore
├── GameProje.sln
├── GameProje
├── Abstract
│ ├── ICampaingService.cs
│ ├── IGameService.cs
│ ├── IGamerCheckManager.cs
│ ├── IGamerService.cs
│ └── IOrderService.cs
├── Adapter
│ └── MernisServiceAdapter.cs
├── Connected Services
│ └── MernisServiceReference
│ │ ├── ConnectedService.json
│ │ └── Reference.cs
├── Consrete
│ ├── CampaingManager.cs
│ ├── GameManager.cs
│ ├── GamerCheckManager.cs
│ ├── GamerManager.cs
│ └── OrderManager.cs
├── Entity
│ ├── Campaign.cs
│ ├── Game.cs
│ └── Gamer.cs
├── GameProje.csproj
└── Program.cs
└── README.md
/.gitattributes:
--------------------------------------------------------------------------------
1 | ###############################################################################
2 | # Set default behavior to automatically normalize line endings.
3 | ###############################################################################
4 | * text=auto
5 |
6 | ###############################################################################
7 | # Set default behavior for command prompt diff.
8 | #
9 | # This is need for earlier builds of msysgit that does not have it on by
10 | # default for csharp files.
11 | # Note: This is only used by command line
12 | ###############################################################################
13 | #*.cs diff=csharp
14 |
15 | ###############################################################################
16 | # Set the merge driver for project and solution files
17 | #
18 | # Merging from the command prompt will add diff markers to the files if there
19 | # are conflicts (Merging from VS is not affected by the settings below, in VS
20 | # the diff markers are never inserted). Diff markers may cause the following
21 | # file extensions to fail to load in VS. An alternative would be to treat
22 | # these files as binary and thus will always conflict and require user
23 | # intervention with every merge. To do so, just uncomment the entries below
24 | ###############################################################################
25 | #*.sln merge=binary
26 | #*.csproj merge=binary
27 | #*.vbproj merge=binary
28 | #*.vcxproj merge=binary
29 | #*.vcproj merge=binary
30 | #*.dbproj merge=binary
31 | #*.fsproj merge=binary
32 | #*.lsproj merge=binary
33 | #*.wixproj merge=binary
34 | #*.modelproj merge=binary
35 | #*.sqlproj merge=binary
36 | #*.wwaproj merge=binary
37 |
38 | ###############################################################################
39 | # behavior for image files
40 | #
41 | # image files are treated as binary by default.
42 | ###############################################################################
43 | #*.jpg binary
44 | #*.png binary
45 | #*.gif binary
46 |
47 | ###############################################################################
48 | # diff behavior for common document formats
49 | #
50 | # Convert binary document formats to text before diffing them. This feature
51 | # is only available from the command line. Turn it on by uncommenting the
52 | # entries below.
53 | ###############################################################################
54 | #*.doc diff=astextplain
55 | #*.DOC diff=astextplain
56 | #*.docx diff=astextplain
57 | #*.DOCX diff=astextplain
58 | #*.dot diff=astextplain
59 | #*.DOT diff=astextplain
60 | #*.pdf diff=astextplain
61 | #*.PDF diff=astextplain
62 | #*.rtf diff=astextplain
63 | #*.RTF diff=astextplain
64 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | ## Ignore Visual Studio temporary files, build results, and
2 | ## files generated by popular Visual Studio add-ons.
3 | ##
4 | ## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore
5 |
6 | # User-specific files
7 | *.rsuser
8 | *.suo
9 | *.user
10 | *.userosscache
11 | *.sln.docstates
12 |
13 | # User-specific files (MonoDevelop/Xamarin Studio)
14 | *.userprefs
15 |
16 | # Build results
17 | [Dd]ebug/
18 | [Dd]ebugPublic/
19 | [Rr]elease/
20 | [Rr]eleases/
21 | x64/
22 | x86/
23 | [Aa][Rr][Mm]/
24 | [Aa][Rr][Mm]64/
25 | bld/
26 | [Bb]in/
27 | [Oo]bj/
28 | [Ll]og/
29 |
30 | # Visual Studio 2015/2017 cache/options directory
31 | .vs/
32 | # Uncomment if you have tasks that create the project's static files in wwwroot
33 | #wwwroot/
34 |
35 | # Visual Studio 2017 auto generated files
36 | Generated\ Files/
37 |
38 | # MSTest test Results
39 | [Tt]est[Rr]esult*/
40 | [Bb]uild[Ll]og.*
41 |
42 | # NUNIT
43 | *.VisualState.xml
44 | TestResult.xml
45 |
46 | # Build Results of an ATL Project
47 | [Dd]ebugPS/
48 | [Rr]eleasePS/
49 | dlldata.c
50 |
51 | # Benchmark Results
52 | BenchmarkDotNet.Artifacts/
53 |
54 | # .NET Core
55 | project.lock.json
56 | project.fragment.lock.json
57 | artifacts/
58 |
59 | # StyleCop
60 | StyleCopReport.xml
61 |
62 | # Files built by Visual Studio
63 | *_i.c
64 | *_p.c
65 | *_h.h
66 | *.ilk
67 | *.meta
68 | *.obj
69 | *.iobj
70 | *.pch
71 | *.pdb
72 | *.ipdb
73 | *.pgc
74 | *.pgd
75 | *.rsp
76 | *.sbr
77 | *.tlb
78 | *.tli
79 | *.tlh
80 | *.tmp
81 | *.tmp_proj
82 | *_wpftmp.csproj
83 | *.log
84 | *.vspscc
85 | *.vssscc
86 | .builds
87 | *.pidb
88 | *.svclog
89 | *.scc
90 |
91 | # Chutzpah Test files
92 | _Chutzpah*
93 |
94 | # Visual C++ cache files
95 | ipch/
96 | *.aps
97 | *.ncb
98 | *.opendb
99 | *.opensdf
100 | *.sdf
101 | *.cachefile
102 | *.VC.db
103 | *.VC.VC.opendb
104 |
105 | # Visual Studio profiler
106 | *.psess
107 | *.vsp
108 | *.vspx
109 | *.sap
110 |
111 | # Visual Studio Trace Files
112 | *.e2e
113 |
114 | # TFS 2012 Local Workspace
115 | $tf/
116 |
117 | # Guidance Automation Toolkit
118 | *.gpState
119 |
120 | # ReSharper is a .NET coding add-in
121 | _ReSharper*/
122 | *.[Rr]e[Ss]harper
123 | *.DotSettings.user
124 |
125 | # JustCode is a .NET coding add-in
126 | .JustCode
127 |
128 | # TeamCity is a build add-in
129 | _TeamCity*
130 |
131 | # DotCover is a Code Coverage Tool
132 | *.dotCover
133 |
134 | # AxoCover is a Code Coverage Tool
135 | .axoCover/*
136 | !.axoCover/settings.json
137 |
138 | # Visual Studio code coverage results
139 | *.coverage
140 | *.coveragexml
141 |
142 | # NCrunch
143 | _NCrunch_*
144 | .*crunch*.local.xml
145 | nCrunchTemp_*
146 |
147 | # MightyMoose
148 | *.mm.*
149 | AutoTest.Net/
150 |
151 | # Web workbench (sass)
152 | .sass-cache/
153 |
154 | # Installshield output folder
155 | [Ee]xpress/
156 |
157 | # DocProject is a documentation generator add-in
158 | DocProject/buildhelp/
159 | DocProject/Help/*.HxT
160 | DocProject/Help/*.HxC
161 | DocProject/Help/*.hhc
162 | DocProject/Help/*.hhk
163 | DocProject/Help/*.hhp
164 | DocProject/Help/Html2
165 | DocProject/Help/html
166 |
167 | # Click-Once directory
168 | publish/
169 |
170 | # Publish Web Output
171 | *.[Pp]ublish.xml
172 | *.azurePubxml
173 | # Note: Comment the next line if you want to checkin your web deploy settings,
174 | # but database connection strings (with potential passwords) will be unencrypted
175 | *.pubxml
176 | *.publishproj
177 |
178 | # Microsoft Azure Web App publish settings. Comment the next line if you want to
179 | # checkin your Azure Web App publish settings, but sensitive information contained
180 | # in these scripts will be unencrypted
181 | PublishScripts/
182 |
183 | # NuGet Packages
184 | *.nupkg
185 | # The packages folder can be ignored because of Package Restore
186 | **/[Pp]ackages/*
187 | # except build/, which is used as an MSBuild target.
188 | !**/[Pp]ackages/build/
189 | # Uncomment if necessary however generally it will be regenerated when needed
190 | #!**/[Pp]ackages/repositories.config
191 | # NuGet v3's project.json files produces more ignorable files
192 | *.nuget.props
193 | *.nuget.targets
194 |
195 | # Microsoft Azure Build Output
196 | csx/
197 | *.build.csdef
198 |
199 | # Microsoft Azure Emulator
200 | ecf/
201 | rcf/
202 |
203 | # Windows Store app package directories and files
204 | AppPackages/
205 | BundleArtifacts/
206 | Package.StoreAssociation.xml
207 | _pkginfo.txt
208 | *.appx
209 |
210 | # Visual Studio cache files
211 | # files ending in .cache can be ignored
212 | *.[Cc]ache
213 | # but keep track of directories ending in .cache
214 | !?*.[Cc]ache/
215 |
216 | # Others
217 | ClientBin/
218 | ~$*
219 | *~
220 | *.dbmdl
221 | *.dbproj.schemaview
222 | *.jfm
223 | *.pfx
224 | *.publishsettings
225 | orleans.codegen.cs
226 |
227 | # Including strong name files can present a security risk
228 | # (https://github.com/github/gitignore/pull/2483#issue-259490424)
229 | #*.snk
230 |
231 | # Since there are multiple workflows, uncomment next line to ignore bower_components
232 | # (https://github.com/github/gitignore/pull/1529#issuecomment-104372622)
233 | #bower_components/
234 |
235 | # RIA/Silverlight projects
236 | Generated_Code/
237 |
238 | # Backup & report files from converting an old project file
239 | # to a newer Visual Studio version. Backup files are not needed,
240 | # because we have git ;-)
241 | _UpgradeReport_Files/
242 | Backup*/
243 | UpgradeLog*.XML
244 | UpgradeLog*.htm
245 | ServiceFabricBackup/
246 | *.rptproj.bak
247 |
248 | # SQL Server files
249 | *.mdf
250 | *.ldf
251 | *.ndf
252 |
253 | # Business Intelligence projects
254 | *.rdl.data
255 | *.bim.layout
256 | *.bim_*.settings
257 | *.rptproj.rsuser
258 | *- Backup*.rdl
259 |
260 | # Microsoft Fakes
261 | FakesAssemblies/
262 |
263 | # GhostDoc plugin setting file
264 | *.GhostDoc.xml
265 |
266 | # Node.js Tools for Visual Studio
267 | .ntvs_analysis.dat
268 | node_modules/
269 |
270 | # Visual Studio 6 build log
271 | *.plg
272 |
273 | # Visual Studio 6 workspace options file
274 | *.opt
275 |
276 | # Visual Studio 6 auto-generated workspace file (contains which files were open etc.)
277 | *.vbw
278 |
279 | # Visual Studio LightSwitch build output
280 | **/*.HTMLClient/GeneratedArtifacts
281 | **/*.DesktopClient/GeneratedArtifacts
282 | **/*.DesktopClient/ModelManifest.xml
283 | **/*.Server/GeneratedArtifacts
284 | **/*.Server/ModelManifest.xml
285 | _Pvt_Extensions
286 |
287 | # Paket dependency manager
288 | .paket/paket.exe
289 | paket-files/
290 |
291 | # FAKE - F# Make
292 | .fake/
293 |
294 | # JetBrains Rider
295 | .idea/
296 | *.sln.iml
297 |
298 | # CodeRush personal settings
299 | .cr/personal
300 |
301 | # Python Tools for Visual Studio (PTVS)
302 | __pycache__/
303 | *.pyc
304 |
305 | # Cake - Uncomment if you are using it
306 | # tools/**
307 | # !tools/packages.config
308 |
309 | # Tabs Studio
310 | *.tss
311 |
312 | # Telerik's JustMock configuration file
313 | *.jmconfig
314 |
315 | # BizTalk build output
316 | *.btp.cs
317 | *.btm.cs
318 | *.odx.cs
319 | *.xsd.cs
320 |
321 | # OpenCover UI analysis results
322 | OpenCover/
323 |
324 | # Azure Stream Analytics local run output
325 | ASALocalRun/
326 |
327 | # MSBuild Binary and Structured Log
328 | *.binlog
329 |
330 | # NVidia Nsight GPU debugger configuration file
331 | *.nvuser
332 |
333 | # MFractors (Xamarin productivity tool) working folder
334 | .mfractor/
335 |
336 | # Local History for Visual Studio
337 | .localhistory/
338 |
339 | # BeatPulse healthcheck temp database
340 | healthchecksdb
--------------------------------------------------------------------------------
/GameProje.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 12.00
3 | # Visual Studio Version 16
4 | VisualStudioVersion = 16.0.30011.22
5 | MinimumVisualStudioVersion = 10.0.40219.1
6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GameProje", "GameProje\GameProje.csproj", "{B1E55E8C-D5C4-4CED-840B-54FCF7E24374}"
7 | EndProject
8 | Global
9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
10 | Debug|Any CPU = Debug|Any CPU
11 | Release|Any CPU = Release|Any CPU
12 | EndGlobalSection
13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
14 | {B1E55E8C-D5C4-4CED-840B-54FCF7E24374}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
15 | {B1E55E8C-D5C4-4CED-840B-54FCF7E24374}.Debug|Any CPU.Build.0 = Debug|Any CPU
16 | {B1E55E8C-D5C4-4CED-840B-54FCF7E24374}.Release|Any CPU.ActiveCfg = Release|Any CPU
17 | {B1E55E8C-D5C4-4CED-840B-54FCF7E24374}.Release|Any CPU.Build.0 = Release|Any CPU
18 | EndGlobalSection
19 | GlobalSection(SolutionProperties) = preSolution
20 | HideSolutionNode = FALSE
21 | EndGlobalSection
22 | GlobalSection(ExtensibilityGlobals) = postSolution
23 | SolutionGuid = {C7F6A8DC-3AB0-45A8-96C1-885793C31E69}
24 | EndGlobalSection
25 | EndGlobal
26 |
--------------------------------------------------------------------------------
/GameProje/Abstract/ICampaingService.cs:
--------------------------------------------------------------------------------
1 | using GameProje.Entity;
2 | using System;
3 | using System.Collections.Generic;
4 | using System.Text;
5 |
6 | namespace GameProje.Abstract
7 | {
8 | interface ICampaingService
9 | {
10 | void Add(Campaign campaign);
11 | void Delete(Campaign campaign);
12 | void UpDate(Campaign campaign);
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/GameProje/Abstract/IGameService.cs:
--------------------------------------------------------------------------------
1 | using GameProje.Entity;
2 | using System;
3 | using System.Collections.Generic;
4 | using System.Text;
5 |
6 | namespace GameProje.Abstract
7 | {
8 | interface IGameService
9 | {
10 | void Add(Game game);
11 | void Update(Game game);
12 | void Delete(Game game);
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/GameProje/Abstract/IGamerCheckManager.cs:
--------------------------------------------------------------------------------
1 | using GameProje.Entity;
2 | using System;
3 | using System.Collections.Generic;
4 | using System.Text;
5 |
6 | namespace GameProje.Abstract
7 | {
8 | interface IGamerCheckManager
9 | {
10 | bool Check(Gamer gamer);
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/GameProje/Abstract/IGamerService.cs:
--------------------------------------------------------------------------------
1 | using GameProje.Entity;
2 | using System;
3 | using System.Collections.Generic;
4 | using System.Text;
5 |
6 | namespace GameProje.Abstract
7 | {
8 | interface IGamerService
9 | {
10 | void Add(Gamer gamer);
11 | void Update(Gamer gamer);
12 | void Delete(Gamer gamer);
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/GameProje/Abstract/IOrderService.cs:
--------------------------------------------------------------------------------
1 | using GameProje.Entity;
2 | using System;
3 | using System.Collections.Generic;
4 | using System.Text;
5 |
6 | namespace GameProje.Abstract
7 | {
8 | interface IOrderService
9 | {
10 | void Order(Game game, Gamer gamer);
11 |
12 | void CampaignOrder(Game game, Gamer gamer, Campaign campaign);
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/GameProje/Adapter/MernisServiceAdapter.cs:
--------------------------------------------------------------------------------
1 | using GameProje.Abstract;
2 | using GameProje.Entity;
3 | using MernisServiceReference;
4 | using System;
5 | using System.Collections.Generic;
6 | using System.Text;
7 |
8 | namespace GameProje.Adapter
9 | {
10 | class MernisServiceAdapter : IGamerCheckManager
11 | {
12 | public bool Check(Gamer gamer)
13 | {
14 | KPSPublicSoapClient client = new KPSPublicSoapClient(KPSPublicSoapClient.EndpointConfiguration.KPSPublicSoap);
15 | return client.TCKimlikNoDogrulaAsync
16 | (new TCKimlikNoDogrulaRequest
17 | (new TCKimlikNoDogrulaRequestBody(
18 | Convert.ToInt64(
19 | gamer.NationalityId),
20 | gamer.FirstName.ToUpper(),
21 | gamer.LastName.ToUpper(),
22 | gamer.DateOfBirth.Year)))
23 | .Result.Body.TCKimlikNoDogrulaResult;
24 | }
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/GameProje/Connected Services/MernisServiceReference/ConnectedService.json:
--------------------------------------------------------------------------------
1 | {
2 | "ProviderId": "Microsoft.VisualStudio.ConnectedService.Wcf",
3 | "Version": "15.0.40203.910",
4 | "GettingStartedDocument": {
5 | "Uri": "https://go.microsoft.com/fwlink/?linkid=858517"
6 | },
7 | "ExtendedData": {
8 | "inputs": [
9 | "https://tckimlik.nvi.gov.tr/Service/KPSPublic.asmx"
10 | ],
11 | "collectionTypes": [
12 | "System.Collections.Generic.Dictionary`2",
13 | "System.Collections.Generic.List`1"
14 | ],
15 | "messageContract": true,
16 | "namespaceMappings": [
17 | "*, MernisServiceReference"
18 | ],
19 | "targetFramework": "netcoreapp3.1",
20 | "typeReuseMode": "All"
21 | }
22 | }
--------------------------------------------------------------------------------
/GameProje/Connected Services/MernisServiceReference/Reference.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------------------------
2 | //
3 | // This code was generated by a tool.
4 | //
5 | // Changes to this file may cause incorrect behavior and will be lost if
6 | // the code is regenerated.
7 | //
8 | //------------------------------------------------------------------------------
9 |
10 | namespace MernisServiceReference
11 | {
12 |
13 |
14 | [System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "2.0.2")]
15 | [System.ServiceModel.ServiceContractAttribute(Namespace="http://tckimlik.nvi.gov.tr/WS", ConfigurationName="MernisServiceReference.KPSPublicSoap")]
16 | public interface KPSPublicSoap
17 | {
18 |
19 | [System.ServiceModel.OperationContractAttribute(Action="http://tckimlik.nvi.gov.tr/WS/TCKimlikNoDogrula", ReplyAction="*")]
20 | System.Threading.Tasks.Task TCKimlikNoDogrulaAsync(MernisServiceReference.TCKimlikNoDogrulaRequest request);
21 | }
22 |
23 | [System.Diagnostics.DebuggerStepThroughAttribute()]
24 | [System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "2.0.2")]
25 | [System.ServiceModel.MessageContractAttribute(IsWrapped=false)]
26 | public partial class TCKimlikNoDogrulaRequest
27 | {
28 |
29 | [System.ServiceModel.MessageBodyMemberAttribute(Name="TCKimlikNoDogrula", Namespace="http://tckimlik.nvi.gov.tr/WS", Order=0)]
30 | public MernisServiceReference.TCKimlikNoDogrulaRequestBody Body;
31 |
32 | public TCKimlikNoDogrulaRequest()
33 | {
34 | }
35 |
36 | public TCKimlikNoDogrulaRequest(MernisServiceReference.TCKimlikNoDogrulaRequestBody Body)
37 | {
38 | this.Body = Body;
39 | }
40 | }
41 |
42 | [System.Diagnostics.DebuggerStepThroughAttribute()]
43 | [System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "2.0.2")]
44 | [System.Runtime.Serialization.DataContractAttribute(Namespace="http://tckimlik.nvi.gov.tr/WS")]
45 | public partial class TCKimlikNoDogrulaRequestBody
46 | {
47 |
48 | [System.Runtime.Serialization.DataMemberAttribute(Order=0)]
49 | public long TCKimlikNo;
50 |
51 | [System.Runtime.Serialization.DataMemberAttribute(EmitDefaultValue=false, Order=1)]
52 | public string Ad;
53 |
54 | [System.Runtime.Serialization.DataMemberAttribute(EmitDefaultValue=false, Order=2)]
55 | public string Soyad;
56 |
57 | [System.Runtime.Serialization.DataMemberAttribute(Order=3)]
58 | public int DogumYili;
59 |
60 | public TCKimlikNoDogrulaRequestBody()
61 | {
62 | }
63 |
64 | public TCKimlikNoDogrulaRequestBody(long TCKimlikNo, string Ad, string Soyad, int DogumYili)
65 | {
66 | this.TCKimlikNo = TCKimlikNo;
67 | this.Ad = Ad;
68 | this.Soyad = Soyad;
69 | this.DogumYili = DogumYili;
70 | }
71 | }
72 |
73 | [System.Diagnostics.DebuggerStepThroughAttribute()]
74 | [System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "2.0.2")]
75 | [System.ServiceModel.MessageContractAttribute(IsWrapped=false)]
76 | public partial class TCKimlikNoDogrulaResponse
77 | {
78 |
79 | [System.ServiceModel.MessageBodyMemberAttribute(Name="TCKimlikNoDogrulaResponse", Namespace="http://tckimlik.nvi.gov.tr/WS", Order=0)]
80 | public MernisServiceReference.TCKimlikNoDogrulaResponseBody Body;
81 |
82 | public TCKimlikNoDogrulaResponse()
83 | {
84 | }
85 |
86 | public TCKimlikNoDogrulaResponse(MernisServiceReference.TCKimlikNoDogrulaResponseBody Body)
87 | {
88 | this.Body = Body;
89 | }
90 | }
91 |
92 | [System.Diagnostics.DebuggerStepThroughAttribute()]
93 | [System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "2.0.2")]
94 | [System.Runtime.Serialization.DataContractAttribute(Namespace="http://tckimlik.nvi.gov.tr/WS")]
95 | public partial class TCKimlikNoDogrulaResponseBody
96 | {
97 |
98 | [System.Runtime.Serialization.DataMemberAttribute(Order=0)]
99 | public bool TCKimlikNoDogrulaResult;
100 |
101 | public TCKimlikNoDogrulaResponseBody()
102 | {
103 | }
104 |
105 | public TCKimlikNoDogrulaResponseBody(bool TCKimlikNoDogrulaResult)
106 | {
107 | this.TCKimlikNoDogrulaResult = TCKimlikNoDogrulaResult;
108 | }
109 | }
110 |
111 | [System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "2.0.2")]
112 | public interface KPSPublicSoapChannel : MernisServiceReference.KPSPublicSoap, System.ServiceModel.IClientChannel
113 | {
114 | }
115 |
116 | [System.Diagnostics.DebuggerStepThroughAttribute()]
117 | [System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "2.0.2")]
118 | public partial class KPSPublicSoapClient : System.ServiceModel.ClientBase, MernisServiceReference.KPSPublicSoap
119 | {
120 |
121 | ///
122 | /// Implement this partial method to configure the service endpoint.
123 | ///
124 | /// The endpoint to configure
125 | /// The client credentials
126 | static partial void ConfigureEndpoint(System.ServiceModel.Description.ServiceEndpoint serviceEndpoint, System.ServiceModel.Description.ClientCredentials clientCredentials);
127 |
128 | public KPSPublicSoapClient(EndpointConfiguration endpointConfiguration) :
129 | base(KPSPublicSoapClient.GetBindingForEndpoint(endpointConfiguration), KPSPublicSoapClient.GetEndpointAddress(endpointConfiguration))
130 | {
131 | this.Endpoint.Name = endpointConfiguration.ToString();
132 | ConfigureEndpoint(this.Endpoint, this.ClientCredentials);
133 | }
134 |
135 | public KPSPublicSoapClient(EndpointConfiguration endpointConfiguration, string remoteAddress) :
136 | base(KPSPublicSoapClient.GetBindingForEndpoint(endpointConfiguration), new System.ServiceModel.EndpointAddress(remoteAddress))
137 | {
138 | this.Endpoint.Name = endpointConfiguration.ToString();
139 | ConfigureEndpoint(this.Endpoint, this.ClientCredentials);
140 | }
141 |
142 | public KPSPublicSoapClient(EndpointConfiguration endpointConfiguration, System.ServiceModel.EndpointAddress remoteAddress) :
143 | base(KPSPublicSoapClient.GetBindingForEndpoint(endpointConfiguration), remoteAddress)
144 | {
145 | this.Endpoint.Name = endpointConfiguration.ToString();
146 | ConfigureEndpoint(this.Endpoint, this.ClientCredentials);
147 | }
148 |
149 | public KPSPublicSoapClient(System.ServiceModel.Channels.Binding binding, System.ServiceModel.EndpointAddress remoteAddress) :
150 | base(binding, remoteAddress)
151 | {
152 | }
153 |
154 | public System.Threading.Tasks.Task TCKimlikNoDogrulaAsync(MernisServiceReference.TCKimlikNoDogrulaRequest request)
155 | {
156 | return base.Channel.TCKimlikNoDogrulaAsync(request);
157 | }
158 |
159 | public virtual System.Threading.Tasks.Task OpenAsync()
160 | {
161 | return System.Threading.Tasks.Task.Factory.FromAsync(((System.ServiceModel.ICommunicationObject)(this)).BeginOpen(null, null), new System.Action(((System.ServiceModel.ICommunicationObject)(this)).EndOpen));
162 | }
163 |
164 | public virtual System.Threading.Tasks.Task CloseAsync()
165 | {
166 | return System.Threading.Tasks.Task.Factory.FromAsync(((System.ServiceModel.ICommunicationObject)(this)).BeginClose(null, null), new System.Action(((System.ServiceModel.ICommunicationObject)(this)).EndClose));
167 | }
168 |
169 | private static System.ServiceModel.Channels.Binding GetBindingForEndpoint(EndpointConfiguration endpointConfiguration)
170 | {
171 | if ((endpointConfiguration == EndpointConfiguration.KPSPublicSoap))
172 | {
173 | System.ServiceModel.BasicHttpBinding result = new System.ServiceModel.BasicHttpBinding();
174 | result.MaxBufferSize = int.MaxValue;
175 | result.ReaderQuotas = System.Xml.XmlDictionaryReaderQuotas.Max;
176 | result.MaxReceivedMessageSize = int.MaxValue;
177 | result.AllowCookies = true;
178 | result.Security.Mode = System.ServiceModel.BasicHttpSecurityMode.Transport;
179 | return result;
180 | }
181 | if ((endpointConfiguration == EndpointConfiguration.KPSPublicSoap12))
182 | {
183 | System.ServiceModel.Channels.CustomBinding result = new System.ServiceModel.Channels.CustomBinding();
184 | System.ServiceModel.Channels.TextMessageEncodingBindingElement textBindingElement = new System.ServiceModel.Channels.TextMessageEncodingBindingElement();
185 | textBindingElement.MessageVersion = System.ServiceModel.Channels.MessageVersion.CreateVersion(System.ServiceModel.EnvelopeVersion.Soap12, System.ServiceModel.Channels.AddressingVersion.None);
186 | result.Elements.Add(textBindingElement);
187 | System.ServiceModel.Channels.HttpsTransportBindingElement httpsBindingElement = new System.ServiceModel.Channels.HttpsTransportBindingElement();
188 | httpsBindingElement.AllowCookies = true;
189 | httpsBindingElement.MaxBufferSize = int.MaxValue;
190 | httpsBindingElement.MaxReceivedMessageSize = int.MaxValue;
191 | result.Elements.Add(httpsBindingElement);
192 | return result;
193 | }
194 | throw new System.InvalidOperationException(string.Format("Could not find endpoint with name \'{0}\'.", endpointConfiguration));
195 | }
196 |
197 | private static System.ServiceModel.EndpointAddress GetEndpointAddress(EndpointConfiguration endpointConfiguration)
198 | {
199 | if ((endpointConfiguration == EndpointConfiguration.KPSPublicSoap))
200 | {
201 | return new System.ServiceModel.EndpointAddress("https://tckimlik.nvi.gov.tr/Service/KPSPublic.asmx");
202 | }
203 | if ((endpointConfiguration == EndpointConfiguration.KPSPublicSoap12))
204 | {
205 | return new System.ServiceModel.EndpointAddress("https://tckimlik.nvi.gov.tr/Service/KPSPublic.asmx");
206 | }
207 | throw new System.InvalidOperationException(string.Format("Could not find endpoint with name \'{0}\'.", endpointConfiguration));
208 | }
209 |
210 | public enum EndpointConfiguration
211 | {
212 |
213 | KPSPublicSoap,
214 |
215 | KPSPublicSoap12,
216 | }
217 | }
218 | }
219 |
--------------------------------------------------------------------------------
/GameProje/Consrete/CampaingManager.cs:
--------------------------------------------------------------------------------
1 | using GameProje.Abstract;
2 | using GameProje.Entity;
3 | using System;
4 | using System.Collections.Generic;
5 | using System.Text;
6 |
7 | namespace GameProje.Consrete
8 | {
9 | class CampaingManager : ICampaingService
10 | {
11 | public void Add(Campaign campaign)
12 | {
13 | Console.WriteLine("Kampanya Eklendi : " + campaign.CampaignName );
14 | }
15 |
16 | public void Delete(Campaign campaign)
17 | {
18 | Console.WriteLine("Kampanya Silindi : " + campaign.CampaignName);
19 | }
20 |
21 | public void UpDate(Campaign campaign)
22 | {
23 | Console.WriteLine("Kampanya Güncellendi : " + campaign.CampaignName);
24 | }
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/GameProje/Consrete/GameManager.cs:
--------------------------------------------------------------------------------
1 | using GameProje.Abstract;
2 | using GameProje.Entity;
3 | using System;
4 | using System.Collections.Generic;
5 | using System.Text;
6 |
7 | namespace GameProje.Consrete
8 | {
9 | class GameManager : IGameService
10 | {
11 | public void Add(Game game)
12 | {
13 | Console.WriteLine(game.GameName + " : Oyunu Eklendi. " );
14 | }
15 |
16 | public void Delete(Game game)
17 | {
18 | Console.WriteLine(game.GameName + " : Oyunu Silidi. ");
19 | }
20 |
21 | public void Update(Game game)
22 | {
23 | Console.WriteLine(game.GameName + " :Oyunu Güncellendi. ");
24 | }
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/GameProje/Consrete/GamerCheckManager.cs:
--------------------------------------------------------------------------------
1 | using GameProje.Abstract;
2 | using GameProje.Adapter;
3 | using GameProje.Entity;
4 | using System;
5 | using System.Collections.Generic;
6 | using System.Text;
7 |
8 | namespace GameProje.Consrete
9 | {
10 | class GamerCheckManager : IGamerCheckManager
11 | {
12 | IGamerCheckManager _gamerCheckService;
13 | public bool Check(Gamer gamer)
14 | {
15 | _gamerCheckService = new MernisServiceAdapter();
16 |
17 | return _gamerCheckService.Check(gamer);
18 | }
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/GameProje/Consrete/GamerManager.cs:
--------------------------------------------------------------------------------
1 | using GameProje.Abstract;
2 | using GameProje.Entity;
3 | using System;
4 | using System.Collections.Generic;
5 | using System.Text;
6 |
7 | namespace GameProje.Consrete
8 | {
9 | class GamerManager : IGamerService
10 | {
11 | IGamerCheckManager _gamerCheckManager;
12 |
13 | public GamerManager(IGamerCheckManager gamerCheckService)
14 | {
15 | _gamerCheckManager = gamerCheckService;
16 | }
17 |
18 | public void Add(Gamer gamer)
19 | {
20 | if (_gamerCheckManager.Check(gamer) == true )
21 | {
22 | Console.WriteLine(" BAŞARILI ");
23 | Console.WriteLine(gamer.UserName + " : Oyuncusu Eklendi 43 ");
24 | }
25 | else
26 | {
27 | Console.WriteLine(" Bi daha bu mekana Gelme :) sahtekar seni ... ");
28 | }
29 | }
30 |
31 | public void Delete(Gamer gamer)
32 | {
33 | Console.WriteLine(gamer.UserName + " : Oyuncusu Silindi ");
34 | }
35 |
36 | public void Update(Gamer gamer)
37 | {
38 | if (_gamerCheckManager.Check(gamer) == true)
39 | {
40 | Console.WriteLine(" BAŞARILI");
41 | Console.WriteLine(gamer.UserName + " : Oyuncusu Güncellendi ");
42 | }
43 | else
44 | {
45 | Console.WriteLine(" Güncelleme Basarısız ");
46 | }
47 | }
48 | }
49 | }
50 |
--------------------------------------------------------------------------------
/GameProje/Consrete/OrderManager.cs:
--------------------------------------------------------------------------------
1 | using GameProje.Abstract;
2 | using GameProje.Entity;
3 | using System;
4 | using System.Collections.Generic;
5 | using System.Text;
6 |
7 | namespace GameProje.Consrete
8 | {
9 | class OrderManager : IOrderService
10 | {
11 | public void CampaignOrder(Game game, Gamer gamer, Campaign campaign)
12 | {
13 | decimal indirimOranı = game.GamePrice - (game.GamePrice * campaign.DiscountRate);
14 |
15 | Console.WriteLine(" Sayın " + gamer.FirstName + " " + gamer.LastName + " " + campaign.CampaignName + " " + game.GameName + " : Oyununu " +
16 | indirimOranı + " TL' ye Satın Aldınız" );
17 |
18 | }
19 |
20 | public void Order(Game game, Gamer gamer)
21 | {
22 | Console.WriteLine(gamer.FirstName + " " + gamer.LastName + " Satın Aldı : " + game.GameName + " " + game.GamePrice + " TL " );
23 | }
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/GameProje/Entity/Campaign.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Text;
4 |
5 | namespace GameProje.Entity
6 | {
7 | class Campaign
8 | {
9 | public int Id { get; set; }
10 | public string CampaignName { get; set; }
11 | public decimal DiscountRate { get; set; }
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/GameProje/Entity/Game.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Text;
4 |
5 | namespace GameProje.Entity
6 | {
7 | class Game
8 | {
9 | public int Id { get; set; }
10 | public string GameName { get; set; }
11 | public int GamePrice { get; set; }
12 | public int Point { get; set; }
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/GameProje/Entity/Gamer.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Text;
4 |
5 | namespace GameProje.Entity
6 | {
7 | class Gamer
8 | {
9 | public int Id { get; set; }
10 |
11 | public string FirstName { get; set; }
12 | public string LastName { get; set; }
13 | public string UserName { get; set; }
14 | public long NationalityId { get; set; }
15 | public DateTime DateOfBirth { get; set; }
16 |
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/GameProje/GameProje.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Exe
5 | netcoreapp3.1
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 | all
14 | runtime; build; native; contentfiles; analyzers; buildtransitive
15 |
16 |
17 | all
18 | runtime; build; native; contentfiles; analyzers; buildtransitive
19 |
20 |
21 |
22 | all
23 | runtime; build; native; contentfiles; analyzers; buildtransitive
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
--------------------------------------------------------------------------------
/GameProje/Program.cs:
--------------------------------------------------------------------------------
1 | using GameProje.Consrete;
2 | using GameProje.Entity;
3 | using System;
4 |
5 | namespace GameProje
6 | {
7 | class Program
8 | {
9 | static void Main(string[] args)
10 | {
11 |
12 | GamerManager gamerManager = new GamerManager(new GamerCheckManager());
13 | Gamer gamer1 = new Gamer
14 | {
15 | Id = 1,
16 | DateOfBirth = new DateTime(1999, 06,07),
17 | FirstName = " SAMET ",
18 | LastName = " AKCA ",
19 | UserName = " SMTcoder ",
20 | NationalityId = 444444
21 | };
22 |
23 | Gamer gamer2 = new Gamer
24 | {
25 | Id = 2,
26 | DateOfBirth = new DateTime(1997, 09, 16),
27 | FirstName = " NAZLI ",
28 | LastName = " CEKİÇ ",
29 | UserName = " Sakar ",
30 | NationalityId = 55555555
31 | };
32 |
33 |
34 |
35 | gamerManager.Add(gamer1);
36 |
37 | Console.WriteLine("----------------------------");
38 |
39 | CampaingManager campaingManager = new CampaingManager();
40 | Campaign campaign = new Campaign { Id =1 , CampaignName = " %60 İNDİRİMLİ ", DiscountRate = 0.60M };
41 | Campaign campaign2 = new Campaign { Id = 2, CampaignName = " %80 İNDİRİMLİ ", DiscountRate = 0.80M };
42 | campaingManager.Add(campaign);
43 |
44 | Console.WriteLine("----------------------------");
45 |
46 | GameManager gameManager = new GameManager();
47 | Game game1 = new Game { Id = 1, GameName = "Red Dead 2 ", GamePrice = 200 };
48 | Game game2 = new Game { Id = 2, GameName = "GTA 5 ", GamePrice = 140 };
49 |
50 | gameManager.Add(game2);
51 | gameManager.Update(game1);
52 |
53 | Console.WriteLine("----------------------------");
54 |
55 | OrderManager orderManager = new OrderManager();
56 |
57 | orderManager.CampaignOrder(game1, gamer1, campaign);
58 | orderManager.Order(game2, gamer2);
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 | }
68 | }
69 | }
70 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # GameProje
2 |
3 | C# - Angular
4 |
5 | Yazılım Geliştirici Yetiştirme Kampı (C#) 5. Gün 5. Ödev
6 |
7 | Bir oyun yazmak istiyorsunuz. Bu yazılım için backend kodlarını C# ile geliştirmeyi planlıyoruz. Yeni üye, satış ve kampanya yönetimi yapılması isteniyor. Nesnelere ait özellikleri istediğiniz gibi verebilirsiniz.
8 |
9 | # Gereksinimler
10 |
11 | 1.Oyuncuların sisteme kayıt olabileceği, bilgilerini güncelleyebileceği, kayıtlarını silebileceği bir ortamı simule ediniz. Müşteri bilgilerinin doğruluğunu e-devlet sistemlerini kullanarak doğrulama yapmak istiyoruz. (E-devlet sistemlerinde doğrulama TcNo, Ad, Soyad, DoğumYılı bilgileriyle yapılır. Bunu yapacak servisi simule etmeniz yeterlidir.)
12 |
13 | 2.Oyun satışı yapılabilecek satış ortamını simule ediniz.( Yapılan satışlar oyuncu ile ilişkilendirilmelidir. Oyuncunun parametre olarak metotta olmasını kastediyorum.)
14 |
15 | 3.Sisteme yeni kampanya girişi, kampanyanın silinmesi ve güncellenmesi imkanlarını simule ediniz.
16 |
17 | 4.Satışlarda kampanya entegrasyonunu simule ediniz.
18 |
--------------------------------------------------------------------------------