protected internal override int Process(Variant result, Variant[] param, Dispatch2
                                                    objthis)
            {
                DictionaryNI ni = (DictionaryNI)objthis.GetNativeInstance(DictionaryClass
                                                                          .ClassID);

                if (ni == null)
                {
                    return(Error.E_NATIVECLASSCRASH);
                }
                if (!ni.IsValid())
                {
                    return(Error.E_INVALIDOBJECT);
                }
                return(Error.S_OK);
            }
            /// <exception cref="TjsException"></exception>
            protected internal override int Process(Variant result, Variant[] param, Dispatch2
                                                    objthis)
            {
                DictionaryNI ni = (DictionaryNI)objthis.GetNativeInstance(DictionaryClass
                                                                          .ClassID);

                if (ni == null)
                {
                    return(Error.E_NATIVECLASSCRASH);
                }
                if (!ni.IsValid())
                {
                    return(Error.E_INVALIDOBJECT);
                }
                if (param.Length < 1)
                {
                    return(Error.E_BADPARAMCOUNT);
                }
                bool clear = true;

                if (param.Length >= 2 && param[1].IsVoid() != true)
                {
                    clear = param[1].AsBoolean();
                }
                VariantClosure clo = param[0].AsObjectClosure();

                if (clo.mObjThis != null)
                {
                    ni.Assign(clo.mObjThis, clear);
                }
                else
                {
                    if (clo.mObject != null)
                    {
                        ni.Assign(clo.mObject, clear);
                    }
                    else
                    {
                        throw new TjsException(Error.NullAccess);
                    }
                }
                return(Error.S_OK);
            }
            /// <exception cref="TjsException"></exception>
            protected internal override int Process(Variant result, Variant[] param, Dispatch2
                                                    objthis)
            {
                DictionaryNI ni = (DictionaryNI)objthis.GetNativeInstance(DictionaryClass
                                                                          .ClassID);

                if (ni == null)
                {
                    return(Error.E_NATIVECLASSCRASH);
                }
                if (!ni.IsValid())
                {
                    return(Error.E_INVALIDOBJECT);
                }
                if (param.Length < 1)
                {
                    return(Error.E_BADPARAMCOUNT);
                }
                string name = param[0].AsString();
                string mode = null;

                if (param.Length >= 2 && param[1].IsVoid() != true)
                {
                    mode = param[1].AsString();
                }
                TextWriteStreamInterface stream = Tjs.mStorage.CreateTextWriteStream(name, mode);

                try
                {
                    AList <Dispatch2> stack = new AList <Dispatch2>();
                    stack.AddItem(objthis);
                    ni.SaveStructuredData(stack, stream, string.Empty);
                }
                finally
                {
                    stream.Destruct();
                }
                if (result != null)
                {
                    result.Set(new Variant(objthis, objthis));
                }
                return(Error.S_OK);
            }
            /// <exception cref="TjsException"></exception>
            protected internal override int Process(Variant result, Variant[] param, Dispatch2
                                                    objthis)
            {
                DictionaryNI ni = (DictionaryNI)objthis.GetNativeInstance(DictionaryClass
                                                                          .ClassID);

                if (ni == null)
                {
                    return(Error.E_NATIVECLASSCRASH);
                }
                if (!ni.IsValid())
                {
                    return(Error.E_INVALIDOBJECT);
                }
                if (param.Length < 1)
                {
                    return(Error.E_BADPARAMCOUNT);
                }
                AList <Dispatch2> stack = new AList <Dispatch2>();
                VariantClosure    clo   = param[0].AsObjectClosure();

                if (clo.mObjThis != null)
                {
                    ni.AssignStructure(clo.mObjThis, stack);
                }
                else
                {
                    if (clo.mObject != null)
                    {
                        ni.AssignStructure(clo.mObject, stack);
                    }
                    else
                    {
                        throw new TjsException(Error.NullAccess);
                    }
                }
                return(Error.S_OK);
            }