Unity is a Dependency Injection container developed by Microsoft.
3
votes
1answer
37 views
TCP authentication server and client
This is the first time I'm dealing with C# as I'm accustomed to Java sockets, so I do want your full review and anything you think I can accomplish better or optimize in the code will be very ...
1
vote
1answer
48 views
Changing height of an UI panel using Array content
I've created following code which works just fine:
...
3
votes
1answer
51 views
Wall-runner type game
I'm working on a Wall-runner reaction based game. As I know my way around a lot of the features Unity provides, I'm still in the beginner phase when it comes to working with several classes and ...
4
votes
3answers
366 views
Simple Q&A game
I just wanted to get some criticism on my programming to make me better. I made a game in Unity, just a simple question and answer game.
Demo
...
1
vote
0answers
72 views
Identity repository pattern with UnitOfWork, GenericRepository and Unity
I created an application from 3 layers, DAL, BLL, and Representation layer in ASP.NET Web API. In DAL i have 4 Classes:
- DatabaseContext.cs, UnitOfWork.cs, GenericRepository and UserInfo. In BLL i ...
2
votes
1answer
135 views
Repository Pattern universal application
When I started learning Repository Pattern with Unity few days ago I was under impression that the main benefit of this pattern is the separation of data layer from the business layer.
In other ...
3
votes
1answer
59 views
Unity Repository Best Practices
I am now developing a product, which will use Unity & Repositories when it comes to data management. I will demonstrate on a simple example. What we want to do, ...
1
vote
0answers
44 views
Unity post/get/check www requests with success callback and error callbacks
This is a class I built to handle post/get requests to URL's, but also check for connection and provide different callbacks depending on success or failure. It is intended to work without being ...
1
vote
3answers
158 views
Make C# Unity Script database methods more re-usable and concise
I have a C# file, that makes some modifications on screen (changes the text on the user interface) but I have some doubts:
How I can re-use the below methods to be more concise and reusable?
How I ...
4
votes
1answer
74 views
Method for obtaining adjacent chunk positions
I'm currently in the process of making a 2D tile based game. This game has an "infinite" world that can be traversed and modified as needed. I am creating the chunks with a mesh and I apply a texture ...
4
votes
1answer
420 views
Unit testing with dependency injection and MOQ
I'm just learning how dependency injection and mocking work, but I'd like some feedback on how I'm setting up a couple of tests. I can get them to pass, but I'm not sure this is all I need.
This is ...
4
votes
3answers
291 views
Unity Lazy Resolve Implementation
I have been using Microsoft.Unity as my container and have decided that the approach for a lazy implementation causes too much rework. Each time you decide to swap ...
5
votes
1answer
2k views
EF Generic Repository + Unit of Work pattern with support for Async
I'm working on a generic repository using EF 6 code first and trying to following the Unit of Work pattern. Unity is being used to inject my repositories, and I'm trying to get everything supporting ...
3
votes
0answers
1k views
Unity Owin per request lifetime middleware
Having changed my website over to owin, I can no longer use Unity's PerRequestLifetimeManager. So I'm writing some middleware for owin in the style of Autofac's ...
5
votes
1answer
398 views
Unity and an IoC for Settings
After a somewhat lengthily discussion in the chat room, I have set up an IoC container with Unity to store my settings in.
This is my static IoC class:
...