private void RegurgitateIVwEnvCall(StoredMethod storedMethod)
        {
            int tag;
            int frag;
            IVwViewConstructor vc;

            switch (storedMethod.MethodType)
            {
            case DecoratorMethodTypes.AddObj:
                var hvo = (int)storedMethod.ParamArray[0];
                vc   = (IVwViewConstructor)storedMethod.ParamArray[1];
                frag = (int)storedMethod.ParamArray[2];
                m_vwEnv.AddObj(hvo, vc, frag);
                break;

            case DecoratorMethodTypes.AddObjProp:
                tag  = (int)storedMethod.ParamArray[0];
                vc   = (IVwViewConstructor)storedMethod.ParamArray[1];
                frag = (int)storedMethod.ParamArray[2];
                m_vwEnv.AddObjProp(tag, vc, frag);
                break;

            case DecoratorMethodTypes.AddObjVec:
                tag  = (int)storedMethod.ParamArray[0];
                vc   = (IVwViewConstructor)storedMethod.ParamArray[1];
                frag = (int)storedMethod.ParamArray[2];
                m_vwEnv.AddObjVec(tag, vc, frag);
                break;

            case DecoratorMethodTypes.AddObjVecItems:
                tag  = (int)storedMethod.ParamArray[0];
                vc   = (IVwViewConstructor)storedMethod.ParamArray[1];
                frag = (int)storedMethod.ParamArray[2];
                m_vwEnv.AddObjVecItems(tag, vc, frag);
                break;

            case DecoratorMethodTypes.AddString:
                var tsStr = (ITsString)storedMethod.ParamArray[0];
                m_vwEnv.AddString(tsStr);
                break;

            case DecoratorMethodTypes.AddStringProp:
                tag = (int)storedMethod.ParamArray[0];
                vc  = (IVwViewConstructor)storedMethod.ParamArray[1];
                m_vwEnv.AddStringProp(tag, vc);
                break;

            case DecoratorMethodTypes.CloseParagraph:
                m_vwEnv.CloseParagraph();
                break;

            case DecoratorMethodTypes.CloseTableCell:
                m_vwEnv.CloseTableCell();
                break;

            case DecoratorMethodTypes.NoteDependency:
                var _rghvo = (int[])storedMethod.ParamArray[0];
                var _rgtag = (int[])storedMethod.ParamArray[1];
                var chvo   = (int)storedMethod.ParamArray[2];
                m_vwEnv.NoteDependency(_rghvo, _rgtag, chvo);
                break;

            case DecoratorMethodTypes.OpenParagraph:
                m_vwEnv.OpenParagraph();
                break;

            case DecoratorMethodTypes.OpenTableCell:
                var nRows = (int)storedMethod.ParamArray[0];
                var nCols = (int)storedMethod.ParamArray[1];
                m_vwEnv.OpenTableCell(nRows, nCols);
                break;

            case DecoratorMethodTypes.SetIntProperty:
                var tpt    = (int)storedMethod.ParamArray[0];
                var tpv    = (int)storedMethod.ParamArray[1];
                var nValue = (int)storedMethod.ParamArray[2];
                m_vwEnv.set_IntProperty(tpt, tpv, nValue);
                break;

            case DecoratorMethodTypes.PropsSetter:
                var value = (ITsTextProps)storedMethod.ParamArray[0];
                m_vwEnv.Props = value;
                break;

            default:
                Debug.Assert(false, "Unknown DecoratorMethodType!");
                break;
            }
        }
Пример #2
0
		private void RegurgitateIVwEnvCall(StoredMethod storedMethod)
		{
			int tag;
			int frag;
			IVwViewConstructor vc;

			switch (storedMethod.MethodType)
			{
				case DecoratorMethodTypes.AddObj:
					var hvo = (int)storedMethod.ParamArray[0];
					vc  = (IVwViewConstructor)storedMethod.ParamArray[1];
					frag = (int) storedMethod.ParamArray[2];
					m_vwEnv.AddObj(hvo, vc, frag);
					break;
				case DecoratorMethodTypes.AddObjProp:
					tag = (int)storedMethod.ParamArray[0];
					vc = (IVwViewConstructor)storedMethod.ParamArray[1];
					frag = (int)storedMethod.ParamArray[2];
					m_vwEnv.AddObjProp(tag, vc, frag);
					break;
				case DecoratorMethodTypes.AddObjVec:
					tag = (int) storedMethod.ParamArray[0];
					vc = (IVwViewConstructor) storedMethod.ParamArray[1];
					frag = (int)storedMethod.ParamArray[2];
					m_vwEnv.AddObjVec(tag, vc, frag);
					break;
				case DecoratorMethodTypes.AddObjVecItems:
					tag = (int)storedMethod.ParamArray[0];
					vc = (IVwViewConstructor)storedMethod.ParamArray[1];
					frag = (int)storedMethod.ParamArray[2];
					m_vwEnv.AddObjVecItems(tag, vc, frag);
					break;
				case DecoratorMethodTypes.AddString:
					var tsStr = (ITsString)storedMethod.ParamArray[0];
					m_vwEnv.AddString(tsStr);
					break;
				case DecoratorMethodTypes.AddStringProp:
					tag = (int)storedMethod.ParamArray[0];
					vc = (IVwViewConstructor)storedMethod.ParamArray[1];
					m_vwEnv.AddStringProp(tag, vc);
					break;
				case DecoratorMethodTypes.CloseParagraph:
					m_vwEnv.CloseParagraph();
					break;
				case DecoratorMethodTypes.CloseTableCell:
					m_vwEnv.CloseTableCell();
					break;
				case DecoratorMethodTypes.NoteDependency:
					var _rghvo = (int[])storedMethod.ParamArray[0];
					var _rgtag = (int[])storedMethod.ParamArray[1];
					var chvo = (int) storedMethod.ParamArray[2];
					m_vwEnv.NoteDependency(_rghvo, _rgtag, chvo);
					break;
				case DecoratorMethodTypes.OpenParagraph:
					m_vwEnv.OpenParagraph();
					break;
				case DecoratorMethodTypes.OpenTableCell:
					var nRows = (int) storedMethod.ParamArray[0];
					var nCols = (int)storedMethod.ParamArray[1];
					m_vwEnv.OpenTableCell(nRows, nCols);
					break;
				case DecoratorMethodTypes.SetIntProperty:
					var tpt = (int)storedMethod.ParamArray[0];
					var tpv = (int)storedMethod.ParamArray[1];
					var nValue = (int)storedMethod.ParamArray[2];
					m_vwEnv.set_IntProperty(tpt, tpv, nValue);
					break;
				case DecoratorMethodTypes.PropsSetter:
					var value = (ITsTextProps) storedMethod.ParamArray[0];
					m_vwEnv.Props = value;
					break;
				default:
					Debug.Assert(false, "Unknown DecoratorMethodType!");
					break;
			}
		}