The .NET Framework is a software framework for Microsoft Windows operating systems. It includes an implementation of the Base Class Library, Common Language Runtime, and Dynamic Language Runtime. It supports many programming languages, including C#, VB.NET, F# and C++.

learn more… | top users | synonyms

1
vote
0answers
28 views

Designing a web based smart card publisher

I'm working on an application that's supposed to have a web based GUI where you can insert some data. That data will be saved in persistent storage and a hex number generated and stored alongside. ...
0
votes
0answers
27 views

pubsub using ActionBlock

I am toying with tpl and dataflow. What I want to achieve is having a kind of "PubSub" which I could post message to, and subscribe to an event in case the execution of the command gives some result. ...
0
votes
1answer
86 views

How to mock the private property of interface for UNIT testing [on hold]

//---Interface.... using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace ClassLibrary1 { public interface IDummyInterface1 ...
0
votes
0answers
22 views

use of minOccurs=“0” without nillable=“true” in SOAP

I have received an XSD from a 3rd party supplier generated from a Java based system; which is to be used to create a SOAP endpoint for us to receive data transfers. Their XSD does not make any use of ...
2
votes
2answers
49 views

can a single SQL Server connection be shared among tasks executed in parallel

Can a single SQL Server connection be shared among tasks executing in parallel? Each task would dequeue an item from a ParallelQueue, instantiate a SqlClient command, and insert a row into the table. ...
1
vote
0answers
53 views

Would the APM be faster or more efficient than TAP?

I'm doing some research for a project in which I will need to create a service which can handle millions of requests per minute. Clearly I want to use an asynchronous programming model to make the ...
0
votes
0answers
37 views

What's the most straightforward way to integrate my company's custom authentication with ASP.NET SSO?

My company has a series of WinForms applications that pretty crudely provides authentication by checking usernames and passwords directly against the database (with a little hashing). I have a fair ...
4
votes
2answers
202 views

Does such a design pattern exist? (Multi-Strategy/Multi-Traits)

Is there a design pattern that would allow a class from a hierarchy to 'subscribe to' concrete methods? For example, say you have an abstract base class that requires the implementation of a method. ...
0
votes
0answers
47 views

can a parallel queue empty itself?

Is there a way to accomplish this pseudo-code in C# in .NET4.5? parallelQueue.attemptDequeueFirstItem(item) success -> ( doAsyncTask(item).Success(UpdateDatabase) ) ...
0
votes
1answer
94 views

Neat way on passing interface parameter to a constructor

Having lots of Interface that needs to pass in a constructor looks messy, is there any neat way of doing it? Code snippet: public class Foo { private readonly IRepository1 _repository1; ...
-2
votes
1answer
103 views

Why are interfaces necessary in MVP design pattern?

I am trying to understands MVP using Winforms. I found this example. Why do UserModel and UserView need to implement the IUserModel and IUserView interfaces ?
0
votes
1answer
25 views

ThreadPool.QueueUserWorkItem is this example a valid use case?

I need to send out a batch of reminder emails, never more than 100 emails per batch, using authenticated SMTP. This is happening on a WindowsService (no GUI). The SMTP library we're using raises a ...
0
votes
0answers
112 views

Are assemblies packed into another sort of file(e.g Portable Executable) before JIT starts converting CIL into native code?

I've read that assembly is the smallest unit of functionality and that CIL code is stored in assembly along with assembly metadata.If this is true, here's my question: Are assemblies packed into ...
0
votes
0answers
29 views

Collection for time-series data in .Net

I am communicating with a device that returns logged data in roughly this format: { timestamp of first data set, [ device1value, device2value, device3value] }, { timestamp of second data set, [ ...
7
votes
2answers
130 views

Should `Vector<float>.Equals` be reflexive or should it follow IEEE 754 semantics?

When comparing floating point values for equality, there are two different approaches: NaN not being equal to itself, which matches the IEEE 754 specification. NaN being equal to itself, which ...
2
votes
2answers
83 views

C# / VB.NET build expression trees only from lambda expressions — why?

Based on the context, C# can generate the expression tree for a LambdaExpression from lambda expression syntax: Expression<Func<string, int>> expr1 = s => s.Length; as can VB.NET: ...
15
votes
6answers
713 views

Methods of debugging code (Nightmare situation)

I am frequently tasked with debugging an application at my job. It is a BI Application that we deploy to businesses, which includes a test environment, and a production environment. I am wondering if ...
-1
votes
2answers
71 views

Creating an ASP.Net MVC web application that can work on different operating systems

I have been developing and deploying many ASP.Net MVC web applications under Windows Server 2008 R2 & Windows Server 2012 R2, and I used IIS 7 & IIS 8. At the same time I know that I can ...
4
votes
2answers
67 views

Branching and Merging Business Data

We're working on a project wherein the business users operate on a set of data that is periodically published. We've labeled the publishing milestones as Versions, and, due to some business ...
1
vote
1answer
73 views

How do constructor parameters of a MVC Controller get set?

How does the construction injection work? I have the following code: public class AdvancedSearchController : Controller { private EmployeeController _employeeController; public ...
-1
votes
1answer
77 views

.net Windows app in a web page [closed]

I am developing a feature related to Microsoft Outlook which has support only for Windows library. However, I have to put this into a web page for the users. In the process of consuming the windows ...
-2
votes
1answer
40 views

Convention for exception argument order [closed]

Just a quick question about a design pattern for creating custom exceptions. The question is more about the order of parameters. If you can specify more data in the exception, should the parameter for ...
2
votes
1answer
83 views

Activity Feed Object to Notify Users

We're developing a transactional application in .NET (ASP.NET MVC, C#, Workflow Foundation, EntityFramework), and want to implement a system whereby users are notified of work that needs to be done ...
1
vote
1answer
64 views

Separating Web API and the client application in .NET [closed]

Up until now I have created my .NET Web API projects with both the API and client code in the same project. In this next project it is important that I separate the two into their own projects. The ...
6
votes
3answers
156 views

Overriding Equals in an unbrittle way

I have a class WorkflowItemSearchCriteria whose instances represent a set of values and references that will be used to return a filtered result set of workflow items based on the given search ...
5
votes
4answers
272 views

Object with Customized Properties and Methods

A project I am working on currently models Order information. Right now, there is one class with a bunch of properties and functions that all of orders have in common. In addition, some of our users ...
0
votes
1answer
41 views

Include exceptions in activity diagrams? [closed]

Should I include exceptions, like a TimeOutException or just general Exceptions, to a activity diagram? For example: A activity diagram describing a client-server connection. Several exceptions can ...
0
votes
4answers
376 views

In C#, what is the benefit of assigning a class variable to an interface variable before calling any methods?

Where I work we develop in C# .NET and I was looking a code that they have made (my job is to optimize it) but I saw something in particular: Assuming that InterfaceDHO is an interface and ClassDHO ...
0
votes
1answer
86 views

Why does the Windows Clipboard require an STA thread?

To copy something to the clipboard in Windows (at least in .NET as far as I know) it has to be done on a separate thread that is in STA Mode. One example I have used is this. Thread thread = new ...
1
vote
1answer
43 views

Why does XmlWriter.Create have output parameters?

Why does XmlWriter's create methods have output parameters? For example (from MSDN) public static XmlWriter Create( StringBuilder output, XmlWriterSettings settings ) output Type: ...
0
votes
3answers
166 views

What really is the “runtime environment”?

This is a very basic question but is something I've never completely understood and recently, when studying .NET Core and ASP.NET 5 I felt the need of a more complete understanding of the topic. ...
1
vote
2answers
51 views

How to design a meta model for configuration? [closed]

In our software we have a client/server architecture where the server is actually running on an embedded system with various hardware components (sensors, etc.). The different sensors as well as other ...
3
votes
0answers
328 views

Writing a Compiler - .reloc section of the COFF

I'm looking for a little bit of direction in writing a compiler. I've written in Common Intermediate Language, C#, and various other .NET languages; I've written my own Metadata Parser and now I'm ...
1
vote
1answer
70 views

windows users vs. custom [closed]

My application needs to support a "shift change" scenario. Essentially, a person is managing some assets. At the shift change, the person that was there leaves right as the replacement signs in. The ...
4
votes
2answers
99 views

Does one need to mock concrete data objects?

I've been working on a large project where much of the code is not under test. I have been able to add some unit tests to functional areas of the code, and also to start mocking services but I have a ...
1
vote
3answers
168 views

I have one app on one server - is there a critical reason to use a web server like IIS or NGINX? [closed]

Considering the following For a stack: ASP.NET/MVC5 WebApi with Single Page Application (SPA). This typically must run in IIS or hosting container (OWIN). I want to deploy multiple web application ...
2
votes
1answer
96 views

Use of project-specific values with enum defined in class library

We have an enum in a class library: Public Enum FieldType Phone Span Gender DrawPath .... End Enum which we use with an attribute applied to properties, for multiple scenarios: ...
1
vote
2answers
183 views

The granularity level to repeat code: should downloading, unzipping etc. be handled by separate classes?

I make extensive use of DI, but I wonder, where is the 'granurality' limit, when some set of functionality should be separated to a class - lets take an example: public class DownloadManager : ...
2
votes
1answer
137 views

Can I fully automate Docker deployment of a .Net CoreCLR on a CI Server without installing Visual Studio?

I'm experimenting with the deployment of ASP.Net 5 CoreCLR apps to Linux Docker containers. Literally all the articles, posts, etc. I found involve using the Visual Studio GUI. On publish a PowerShell ...
1
vote
1answer
113 views

How to improve performance for serializing and deserializing a large object graph?

I have a large object graph in .NET (F# as it happens) that I need to persist to disk and then will load again periodically for use in a calculation. The performance of deserializing is more ...
0
votes
2answers
111 views

IoC container with lifetime attribute [closed]

Which ioc frameworks for .net can use concrete type attribute to choose it's lifetime? Here is a simple example public interface IService {} [Singleton] public class ServiceImplA : IService {} ...
1
vote
2answers
72 views

Working with local connections instead of global

In recent weeks I became very concerned that the way I've been working with database connections for the past years, is simply wrong. I exclusively create a new connection for each database operation ...
3
votes
3answers
106 views

Split a File into Multiple Objects Functionally

I want to read a file into a collection of objects. The data (it's a Leica PTX file if you're curious) is formatted as follows: 640 [begin item #1: number of columns] 480 [number of rows] 0 0 0 ...
3
votes
3answers
164 views

Which scenarios to use .NET Concurrent Collections effectively?

I am investigating how to introduce parallelism into an application to improve performance. In particular, I am looking at parallel for loops and their variants and my initial experiments show ...
5
votes
3answers
188 views

Entity Framework in n-tier application confusion

I'm building a rather large (web) application where I'm using Entity Framework to communicate with the database. My solution is set up in layers like so: Client Website (MVC web application) ...
8
votes
4answers
1k views

Will the Database connection be closed if we yield the datareader row and not read all the records?

While understanding how yield keyword works, I came across link1 and link2 on StackOverflow which advocates the use of yield return while iterating over the DataReader and it suits my need as well. ...
1
vote
1answer
161 views

Is there an reason to call the base constructor of object?

I wonder if there is any reason to call the base constructor when inheriting from object. class Foo { public Foo() : base() // calling the Object constructor { // Foo ...
2
votes
1answer
179 views

What is the best way to horizontally scale .Net back-end applications?

Given a workload with many long running CPU/IO intensive operations (e.g. producing multi-GB text files from database reads and business rules), what is the best way to balance .net application load ...
1
vote
2answers
489 views

C# .NET MVVM software architecture and naming conventions

I am currently working on a software using C# .NET and WPF with the MVVM pattern. Though the software is almost done, I have been discussing our architecture for a long time and I would like to get ...
4
votes
1answer
776 views

Why is there not a basic SortedList<T>?

As far as I know, there is no way to get a List<T> with the capacity to sort itself. If I add a element, I want the data-structure to insert it in the right position (based on the associated ...