GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - anjoiype/SecretOperation: This repository contains a solution which serves as an example for publisher-subscriber pattern in C#.

BranchesTags
Open more actions menu

Latest commit

 

History

11 Commits
11 Commits

Folders and files

NameName
Last commit message
Last commit date
SecretOperation
SecretOperation
 
 
SecretOperationTests
SecretOperationTests
 
 
.gitattributes
.gitattributes
 
 
.gitignore
.gitignore
 
 
README.md
README.md
 
 
SecretOperation.sln
SecretOperation.sln
 
 

Repository files navigation

SecretOperation

This repository contains a solution which serves as an example for publisher-subscriber pattern in C#. Program.cs serves as the entry point of the solution.

Overview

Secret operation is a program in which messages which are tagged to different departments like finance, defence, internal security are encrypted and send to the listeners. There are listeners who listens to particular topic or all topics. Here the publisher is the MessageEncryptor.cs class which encrypts and notifies the subscirbers after the message gets encrypted. The encrypted message is read by the subscribers and displayed.

Note

For keeping the program simple, the subscribers display the encrypted message as it is and there is no decryption method.

The encryption method used is very simple as the main objective of program is not about the encryption. Encryption method is called as Ceasor Cipher With Key where the letters in the message is replaced with letter which comes after N shifts in ASCII table where N is the key

The input is read from file which is kept under Resources folder. Each file type is named accordingly. In the Message.cs class invocation of correct type takes place. Again this hard coded approach is taken to attain simplicity of program and to concentrate on pattern demo.

'Program.cs' will first instantiate the message with its type, which can be any one from Defence, finance or internal security. After that encrytption technique is chosen (here its a dummy technique) and instantiate MessageEncryptor using that. After that different type of subscriber will subscribe to the message with topics they are interested about. There is a general listener which is interested in all the message irrespective of its type. After the encryption subscribers are notified with encrypted message which will be printed in the console.

About

This repository contains a solution which serves as an example for publisher-subscriber pattern in C#.

Resources

Readme
Activity

Stars

0 stars

Watchers

1 watching

Forks

0 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.