Solve C# Library Unexpected Behaviour

Job Description:

A simple enough problem on the face of it:

Create a Library class C that creates and holds a static BufferBlock<T>instance . Two projects A and B have C as a dependency. All three are in the same Visual Studio solution. Project A and Project B are not aware of each other.

When Project A and Project B start up, they request the instance of the BufferBlock from C with a getBufferBlockl() method.

The unexpected behaviour is that the same instance is not being returned of the static object from the Library class. Each call from the separate project is being returned with a new instance.

Since I want Project B to write into the BufferBlock and for Project A to read from the same BufferBlock this is a problem.

Can you solve this problem for me.

Update: The solution to this must be a zipped file of a simple working demo of a three project Visual Studio Solution as described above, targeted at .Net 6.0 and which works on my machine :-)

Habilidades: Programación en C++, Programación en C#, Programación en C, Arquitectura de software, .NET

Sobre el cliente:
( 5 comentarios ) Faridabad, India

Nº del proyecto: #36226473

10 freelancers están ofertando un promedio de ₹7640 por este trabajo


HI, The way you are trying to implement is not possible, because both project A and B will have different process and library C will provide respective static instance for those process. Best way to solve this is usin Más

₹12000 INR en 7 días
(3 comentarios)

this issue could be that the two projects are referencing different copies of the library class C, rather than sharing the same instance. You could try ensuring that both projects reference the same copy of the library Más

₹7000 INR en 7 días
(2 comentarios)

Dear , As a new freelancer, I am excited to offer my services to complete the task of creating a Library class C that creates and holds a static BufferBlock<T> instance. I understand that this project is important to Más

₹3000 INR en 2 días
(0 comentarios)

मैं ब्राज़ील का हूँ और एक प्रोग्रामर हूँ। मुझे विश्वास है कि मेरे पास पुस्तकालय के साथ आपकी समस्या का उत्तर है।. I'm Brazilian and a programmer. I believe I have the answer to your problem with the library.

₹2900 INR en 2 días
(0 comentarios)

I've reviewed your project description and I expect to submit the solution by the allotted time. I'm familiar with VS, C#, and .NET work and I'm confident in my ability to complete this task in a timely manner. please Más

₹6000 INR en 7 días
(0 comentarios)

I am a lead FULL STACK software engineer and responsible for creating a mobile, web and desktop applications using different languages and technologies if u r interested just send me a message thank you and good luck

₹7000 INR en 7 días
(0 comentarios)

Hi Greetings! I am available right now for the project discussion and can start the project on an immediate basis. I have understood your project requirement I have7++ experience in design and development. I can ha Más

₹12500 INR en 7 días
(1 comentario)

I am a senior programmer with 11+ years of .Net, C#, SQL and Azure application development, API design and development, integration, deployment and testing experience. I have full stack development experience using .Ne Más

₹9000 INR en 7 días
(0 comentarios)