Ejemplo n.º 1
0
		/// <summary>
		/// Return the MeVirtualHandler for the supplied cache, creating it if needed.
		/// </summary>
		/// <param name="cda"></param>
		/// <param name="className">name of class to define prop for</param>
		/// <param name="fieldName">field name for virtual prop</param>
		/// <param name="cpt">type of property, from CellarModuleDefns</param>
		/// <returns></returns>
		public static DummyVirtualHandler InstallDummyHandler(IVwCacheDa cda, string className, string fieldName, int cpt)
		{
			DummyVirtualHandler vh = (DummyVirtualHandler)cda.GetVirtualHandlerName(className, fieldName);
			if (vh == null)
			{
				vh = new DummyVirtualHandler();
				vh.Type = cpt;
				vh.ClassName = className;
				vh.FieldName = fieldName;
				cda.InstallVirtual(vh);
			}
			return vh;
		}