C# is a multiparadigm, managed, garbage-collected object-oriented programming language created by Microsoft in parallel with the .NET platform

learn more… | top users | synonyms

2
votes
0answers
57 views

In WPF, should I base my converters on types or use-cases?

I'm looking for some advice on how to write my WPF value converters. The way I'm currently writing them, they are very specific, like (bool?,bool) => Brush, i.e. I'm writing each converter for a ...
2
votes
0answers
91 views

Passing Anonymous Type to a Bound Control

Generally speaking, I'm fairly opposed to the use of anonymous types in real-world code (except in LINQ and some other specific scenarios), but I'm looking right now at a situation where I need to ...
2
votes
0answers
176 views

An efficient way of starting an arbitrary number of consumer threads?

I have a Producer/Consumer implementation where the number of consumers is configurable (this is a form of configurable throttling). The producer and consumer are kicked off like this: var cts = new ...
2
votes
0answers
190 views

Match buyers and sellers based on date ranges and quantity of shares

NOTE: This is in reference to the question I asked on Stack Overflow but was told to post this here I'm building a trading application that matches buyers/sellers that own subscription. Subscriptions ...
2
votes
0answers
439 views

Clustering Strings on the basis of Common Substrings

I have around 10000+ strings and have to identify and group all the strings which looks similar(I base the similarity on the number of common words between any two give strings). The more number of ...
1
vote
0answers
125 views

How do I resolve $ref in a JSON object?

I have written a single page application that uses rest services to retrieve JSON objects. The JSON objects being returned are C# objects serialized using the Newtonsoft.JSON library. The returned ...
1
vote
0answers
110 views

What strategy to follow while matching sql server datatypes in C# Code First approach while using Entity Framework

While matching SQL Server datatypes with C# Code First Approach in Entity Framework, what are specific points that we should keep in mind so that our C# datatype should match exactly our SQL Server ...
1
vote
0answers
65 views

Managing debug information of C program for Debugger

I am not sure if the title is appropriate. I have written a parser for CDB files in C# and ANTLR that creates runtime objects for me such that I can pass it to the TCF Agent which takes care of ...
1
vote
0answers
125 views

How to backup data and images in this project?

I have MS C# and MS SQL 2008 database project. It can capture employees' records with pictures of more than 1000 records. Presently, I'm able to capture say 150 records on PC1 using my installed C# ...
1
vote
0answers
43 views

Is it improper to have an application wide source for dropdown binding

The WPF Combobox needs to bind a collection to it's ItemsSource and something to bind the selected item or value to. Until now, I've included both the collection and the selected value properties that ...
1
vote
0answers
73 views

Having trouble with exposing class properties across projects

I have several projects in my solution: Logan.Web.DBContext defines the DbContext for the database and builds the data model Logan.Web.Objects defines the classes that will represent the tables in ...
1
vote
0answers
55 views

Handling permissions in a MVP application

In a windows forms payroll application employing MVP pattern (for a small scale client) I'm planing user permission handling as follows (permission based) as basically its implementation should be ...
1
vote
0answers
160 views

Best Practice Method for Including Images in a DataGrid using MVVM

All, I have a WPF DataGrid. This DataGrid shows files ready for compilation and should also show the progress of my compiler as it compiles the files. The format of the DataGrid is Image|File ...
1
vote
0answers
123 views

How much segregation is too much in this design?

We are working on ASP.NET webforms application developed using WCSF (MVP pattern). In the application, there is a search screen that allows the user to enter some fields and display the results. We ...
1
vote
0answers
114 views

State Pattern Code for embedded device - Dependency Injection of Device Objects in Context and State Classes

I'm wrestling with some code and I think I've finally gotten some state pattern code working with my events. I've got a simplified system that will work like this: This is my first go with State ...
1
vote
0answers
102 views

Run a function when a function in a list is executed?

Goal: I'm currently doing an MVC project and I have this method to update the ViewBag (based on previous actions of the user). I would like to call this function whenever a certain list of MVC Actions ...
1
vote
0answers
198 views

How to choose which schema design for a tree structured domain model

I have the following classes that I want to store. public class StorableObject { public string Id { get; set; } } public class User : StorableObject { public string Name { get; set; } } ...
1
vote
0answers
670 views

.NET software design and Oracle ODP.NET UDT

I'm working on a new common .NET software design (mainly) for WCF-based web service applications with related client frontends (all written in C#). As far I've chosen some frameworks ...
1
vote
0answers
364 views

ASP.NET Mvc3 - application/request lifetime and dependency injection

I thought of asking on SO, but it seems this is more of a "concept" type question than a "problem" type question. If it needs to be moved, please do so. Anyway, I'm having a tough time finding ...
0
votes
0answers
16 views

Do I need EventAggregator here?

I'm learning MVVM pattern with C#, WPF and .NET Framework 4.5.1. I'm using MVVM Light framework to do it and now I have a doubt. Reading the book Windows 8 MVVM Patterns Revealed I see that the ...
0
votes
0answers
70 views

Evaluating local storage for data persistence for small, stand-alone applications

TL;DR - I have a standalone application that will remain relatively small. I'm trying to evaluate between using XML files or a lightweight database for local storage of data that needs to be ...
0
votes
0answers
51 views

Separation of concerns between repository and service in DDD with complex entities

This probably seems as an example of opinion-based question, but I'm actually looking for rationale on how to decide correctly, I believe there is a correct solution that can be backed by solid ...
0
votes
0answers
123 views

how to use Sql query to search text in CSV file and avoid iteration

I have one A File and many input files ,All files have CSV format . I want to match text of one column of all input files with one of the column of A file . I have stored all column value of File A in ...
0
votes
0answers
96 views

Login from external application in MVC

We have an ASP.Net MVC application that use Identity provider to authenticate users. A new customer now wants to access owr application pressing a button inside their winform app. I started to modify ...
0
votes
0answers
68 views

ISerializable vs WCF attributes

In C# .NET there is two main possibilities to serialize and object. Implementing the ISerializable interface? Using the [DataContract/DataMember] serialization attribute of WCF? What are the ...
0
votes
0answers
63 views

Encapsulate multiple properties into a single class to use as a custom DependencyProperty

My application is a WPF project implemented in C# .NET (4.5) using an MVVM architecture with no code-behind in the View. In order to eliminate the coupling between the View and the ViewModel I'm ...
0
votes
0answers
84 views

TryUpdateModel vs Parameter and ModelState.IsValid

As I was originally learning about MVC, the book I was using taught the following technique for Controller actions: public ActionResult MethodName(Model model) { if (ModelState.IsValid) { } ...
0
votes
0answers
54 views

Can sequence alignment algorithms be used for search implementation?

Hi I want to implement a search on a website which includes imperfect search results. Meaning, if the search term is misspelled or slightly different from a 100% match, the function should still ...
0
votes
0answers
84 views

UI Field validation in MVP pattern

I want to validate the details provided by the user before taking them into the processing. My UIs have Text boxes, Combos mainly and, there are some fields that user must provide a data, in some ...
0
votes
0answers
67 views

Using Statement lambda in exception handling

Following is a code snippet from MVP Win Forms application and this explanation would be helpful when answering the questions. My DAL doesn't handle exceptions and it will be propagated up to the ...
0
votes
0answers
69 views

does class reference itself static anti pattern in prism

I have an application and my desing approach look like this: class Manager { public int State; static Manager _instance = null; public static Manager Instance { get { return ...
0
votes
0answers
231 views

What's the best way to expose a Model object in a ViewModel?

In a WPF MVVM application, I exposed my model object into my viewModel by creating an instance of Model class (which cause dependency) into ViewModel. Instead of creating separate VM properties, I ...
0
votes
0answers
134 views

Architecture or Pattern for handling properties with custom setter/getter?

Current Situation: I'm doing a simple MVC site for keeping journals as a personal project. My concern is I'm trying to keep the interaction between the pages and the classes simplistic. Where I run ...
0
votes
0answers
218 views

Updating GUI in 'realtime' using events

My Plan Have a system that holds some objects Have a winforms-form that displays some key values of these objects When certain changes occur(object gets add / removed / datat change): Update GUI ...
0
votes
0answers
93 views

.NET DataSource binding for legacy SQL Server DB with undefined relationships

I'm designing a utility that will load data into a legacy SQL Server Database. I've been trying to mock up a simple WinForms utility with C# using the DataSource connectors (Tried a straight ORM ...
0
votes
0answers
67 views

Creating New Wrapper Objects and Extension Classes and Keeping it Organized

Here's my situation: I'm programming an embedded device with a very simple, but customizable LED array display. It's 10 RGB LEDs linearly setup. The LEDs will be used to display many different ...
0
votes
0answers
433 views

How to design socks proxy server (OOP)

I'm working on a socks server application written in C#. But I don't really know how to design this in a nice way. I got this for Socks V4 and V4A: I'm not sure if it clears things up, but I think ...
0
votes
0answers
40 views

Sproc chaining verse discrete calls from OO code

I'm currently working on a change at work to generalize a function that was sloppily coded up to work for a particular use case. The function calls a particular sproc that checks if an entity exists ...
0
votes
0answers
145 views

How to design modular “screen configurator” for database application

I am currently working with a product that is effectively a glorified CRUD application. (It is a C# .NET 4.0 desktop application backed by an Oracle 11gR2 database.) The client program presents a list ...
0
votes
0answers
67 views

Inputs and outputs to a method mixed in the UI

I am designing the front end of an WPF application using MVVM where basically all we are doing (for now) is calling a method with some inputs and displaying the outputs. There are two types of ...
0
votes
0answers
224 views

What are the shortcomings of using AuthorizeAttribute in this way in MVC?

I have ASP.Net MVC project code with custom authorization as below: public class UpdateAccrualAuthorize : AuthorizeAttribute { public override void OnAuthorization(AuthorizationContext ...
0
votes
0answers
162 views

Managing child worker thread list

After so much research, I thought I should ask the experts. I am working on a project for my corporate employer, we have android and iPhone mobile apps that make request to a web service, the request ...
0
votes
0answers
480 views

Best method for async initialization of view model in MVVM pattern (WPF)

I'm working on a business application (C#, WPF, EF, MVVM). I need to load a bunch of items from database, create view models for them and put them in a window. Is there a way to create the view model ...
0
votes
0answers
145 views

Algorithm for pinning joints for use with inverse kinematics

I'm part of the development team for a 2D animation program. One of the key features of the program is the ability to pose figures using Inverse Kinematics. Although we have that part down, we need to ...
0
votes
0answers
97 views

Web Farm access to pool of resources

I am learning how to structure an application using a web farm (for high availability rather than load). I have a pool of resources in which one user can access one element in the resource pool at any ...
0
votes
0answers
86 views

Script files as resource or solution project?

I've written a program for another group within my company that uses scripts. These scripts are user selected by the use of two drop down lists: category and name. Currently the application uses an ...
0
votes
0answers
159 views

Entity framework separating entities for product and customer specific implementation

I am designing an application with intention into making it a product line. I would like to extend the functionality across all layers and first struggle is with domain models. For example, core ...
0
votes
0answers
134 views

UPOS RFIDScanner data format

A lot of work that I do currently is based in the OPOS/UPOS world. My company has a device that can read 13.56Mhz tags (RFID), Smart Cards, and Mag Stripe cards. Up until somewhat recently I have only ...
0
votes
0answers
310 views

Fixed Sized Buffer or Variable Buffers with C# Sockets

I am busy designing a TCP Server class in C# that has events and allows the user of the class to define packets that the server can send a receive by registering a class that is derived from my ...
0
votes
0answers
72 views

Strong Name signing order for dependant projects

I have two project A(.EXE) and B(.DLL) in the solution. A references B. If I delay sign both and send them for full signing. Will A be able to load B after ? Or do I have to get B fully signed first, ...