Example #1
0
            /// <summary>
            ///     Checks if there is a strategy of the given type and returns it.
            /// </summary>
            /// <param name="strategy">
            ///     Type of the strategy instance.
            /// </param>
            /// <returns>
            ///     A strategy instance of the requested type,
            ///     or <see cref="DefaultStrategy"/> if it wasn't found.
            /// </returns>
            public IPasteStrategy this [PasteStrategy strategy] {
                get {
                    if (strategies.ContainsKey(strategy))
                    {
                        return(strategies [strategy]);
                    }

                    return(DefaultStrategy);
                }
            }
			/// <summary>
			///     Checks if there is a strategy of the given type and returns it.
			/// </summary>
			/// <param name="strategy">
			///     Type of the strategy instance.
			/// </param>
			/// <returns>
			///     A strategy instance of the requested type,
			///     or <see cref="DefaultStrategy"/> if it wasn't found.
			/// </returns>
			public IPasteStrategy this [PasteStrategy strategy] {
				get {
					if (strategies.ContainsKey (strategy)) {
						return strategies [strategy];
					}

					return DefaultStrategy;
				}
			}