c# Programming Glossary: responsibility
c# and excel automation - ending the running instance http://stackoverflow.com/questions/1041266/c-sharp-and-excel-automation-ending-the-running-instance methods never a naked COM object and it would be the responsibility of the caller to dispose of it usually with a using statement.. wrapped object never a naked one and again it would be the responsibility of the caller to release it. You could use a different protocol..
MVVM: Binding to Model while keeping Model in sync with a server version http://stackoverflow.com/questions/10437241/mvvm-binding-to-model-while-keeping-model-in-sync-with-a-server-version it's also not in the spirit of MVVM. ViewModels have sole responsibility for pushing changes. This obviously includes pushing changes.. the primary key but it doesn't need to because that's a responsibility of the DS. When the user finishes editing they interact with..
Refactoring code to avoid anti-pattern http://stackoverflow.com/questions/11224170/refactoring-code-to-avoid-anti-pattern questions 13148 is it good code to satisfy single responsibility principle CODE public interface IBankAccount RepositoryLayer.IRepository.. questions 13148 is it good code to satisfy single responsibility principle Using the Single Responsibility Principle forces my.. http programmers.stackexchange.com questions 150760 single responsibility principle how can i avoid code fragmentation c# .net design..
Unit Testing without Database: Linq to SQL http://stackoverflow.com/questions/11348691/unit-testing-without-database-linq-to-sql design share improve this question The Repository responsibility is to persist domain objects and fetch them on request. i.e...
View Models and dependency injection http://stackoverflow.com/questions/14131804/view-models-and-dependency-injection which are much more lightweight. I then add a class whose responsibility is to compose the view model from one or more sources e.g. a..
Design pattern for handling multiple message types http://stackoverflow.com/questions/1477471/design-pattern-for-handling-multiple-message-types you find one that can handle it. Similar to the chain of responsibility pattern public interface IMessageHandler bool HandleMessage..
Creating a byte array from a stream http://stackoverflow.com/questions/221925/creating-a-byte-array-from-a-stream but will at least be correct. It doesn't assume any responsibility for closing the stream the caller should do that. See this article..
What are the differences between various threading synchronization options in C#? http://stackoverflow.com/questions/301160/what-are-the-differences-between-various-threading-synchronization-options-in-c thread identity on WaitOne or Release.. programmers responsibility to not muck up. Semaphores are of two types local semaphores..
C# USING keyword - when and when not to use it? http://stackoverflow.com/questions/317184/c-sharp-using-keyword-when-and-when-not-to-use-it mean passing it to another piece of code that assumes responsibility. I've actually seen debug code of the type #if DEBUG ~Foo complain..
STAThread missing, but it is there http://stackoverflow.com/questions/3584434/stathread-missing-but-it-is-there
Who should call Dispose on IDisposable objects when passed into another object? http://stackoverflow.com/questions/4085939/who-should-call-dispose-on-idisposable-objects-when-passed-into-another-object or acquired ownership of the object then it is your responsibility to dispose it. This means that if you receive a disposable object..
CLR vs JIT http://stackoverflow.com/questions/601974/clr-vs-jit from the intermediate representation it is the JIT's responsibility to convert it. Exactly when the JIT will kick in is implementation..
Injecting dependencies into ASP.NET MVC 3 action filters. What's wrong with this approach? http://stackoverflow.com/questions/7192543/injecting-dependencies-into-asp-net-mvc-3-action-filters-whats-wrong-with-this Seeman's approach because it separates the Action Filter responsibility away from the Attribute. Furthermore Ninject's MVC3 extension..
Refactoring code to avoid anti-pattern http://stackoverflow.com/questions/11224170/refactoring-code-to-avoid-anti-pattern directly to store the data. Is this a violation of Single Responsibility Principle How to correct it Note The repository pattern is implemented.. satisfy single responsibility principle Using the Single Responsibility Principle forces my containers to have public setters http programmers.stackexchange.com.. reasons. So no anti pattern but a violation of the Single Responsibility Principle for sure. The last 2 responsibilities should be moved..
Polymorphism: Is ORM entity a Domain Entity or Data Entity? http://stackoverflow.com/questions/11257484/polymorphism-is-orm-entity-a-domain-entity-or-data-entity Any code example or reference 3 Will it satisfy Single Responsibility Principle CODE public interface IBankAccount int BankAccountID..
Mixed lifestyle for Per Thread and Per Web Request with Simple Injector http://stackoverflow.com/questions/13147509/mixed-lifestyle-for-per-thread-and-per-web-request-with-simple-injector will shout that this class is violating the Single Responsibility Principle since this decorator both runs commands on a new thread..
How to avoid Dependency Injection constructor madness? http://stackoverflow.com/questions/2420193/how-to-avoid-dependency-injection-constructor-madness Injection is that it makes violations of the Single Responsibility Principle glaringly obvious. When that happens it's time to..
Partial Classes - are they bad design? http://stackoverflow.com/questions/2477839/partial-classes-are-they-bad-design because they're too big you should revisit the Single Responsibility Principle . If you have three or more partial fragments for..
Do you use 'this' in front of instance variables? http://stackoverflow.com/questions/762025/do-you-use-this-in-front-of-instance-variables your type is too big and probably not following the Single Responsibility Principle . And lets say you are. Why keep the this. around..
Why is The Iteration Variable in a C# foreach statement read-only? http://stackoverflow.com/questions/776430/why-is-the-iteration-variable-in-a-c-sharp-foreach-statement-read-only sequence. Assigning a value to it breaks the Single Responsibility Principle or Curly's Law if you follow Coding Horror. A variable..
|