Click here to Skip to main content
15,892,768 members
Articles / Programming Languages / C#

Patterns for controlling an object's public operations outside of it

Rate me:
Please Sign up or sign in to vote.
5.00/5 (3 votes)
22 May 2017CPOL5 min read 9.7K   6  
We frequently need to control (or limit) the public operations of an object based on the sate of another object (mostly the owner). I have listed four ways of dealing with such situations with a sample player, playlist scenario.

Views

Daily Counts

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Software Developer (Senior) Freelance
Sweden Sweden
Experienced senior C# developer, sometimes codes in Java and C++ also. He designs and codes desktop applications (WinForms, WPF), windows services and Web APIs (WCF, ASP.Net MVC). He is currently improving his ASP.Net MVC and JavaScript capabilities. He acts as an architect, coder and trainer.
He is mostly experienced in Media Asset Management (MAM) applications, broadcasting sector and medical applications.

LinkedIn: www.linkedin.com/mustafa-kok/
GitHub: github.com/nthdeveloper
StackOverflow: stackoverflow.com/users/1844220/nthdeveloper

Comments and Discussions