예제 #1
0
        /// <summary>
        /// Initializes a new instance of the <see cref="ActionListSuite"/> class.
        /// </summary>
        /// <param name="actionReferenceSuite">The action reference suite instance.</param>
        /// <param name="zstringSuite">The ASZString suite instance.</param>
        /// <exception cref="ArgumentNullException">
        /// <paramref name="actionReferenceSuite"/> is null.
        /// or
        /// <paramref name="zstringSuite"/> is null.
        /// </exception>
        public ActionListSuite(IActionReferenceSuite actionReferenceSuite, IASZStringSuite zstringSuite)
        {
            if (actionReferenceSuite == null)
            {
                throw new ArgumentNullException(nameof(actionReferenceSuite));
            }
            if (zstringSuite == null)
            {
                throw new ArgumentNullException(nameof(zstringSuite));
            }

            make            = new ActionListMake(Make);
            free            = new ActionListFree(Free);
            getType         = new ActionListGetType(GetType);
            getCount        = new ActionListGetCount(GetCount);
            putInteger      = new ActionListPutInteger(PutInteger);
            putFloat        = new ActionListPutFloat(PutFloat);
            putUnitFloat    = new ActionListPutUnitFloat(PutUnitFloat);
            putString       = new ActionListPutString(PutString);
            putBoolean      = new ActionListPutBoolean(PutBoolean);
            putList         = new ActionListPutList(PutList);
            putObject       = new ActionListPutObject(PutObject);
            putGlobalObject = new ActionListPutGlobalObject(PutGlobalObject);
            putEnumerated   = new ActionListPutEnumerated(PutEnumerated);
            putReference    = new ActionListPutReference(PutReference);
            putClass        = new ActionListPutClass(PutClass);
            putGlobalClass  = new ActionListPutGlobalClass(PutGlobalClass);
            putAlias        = new ActionListPutAlias(PutAlias);
            putIntegers     = new ActionListPutIntegers(PutIntegers);
            putData         = new ActionListPutData(PutData);
            putZString      = new ActionListPutZString(PutZString);
            getInteger      = new ActionListGetInteger(GetInteger);
            getFloat        = new ActionListGetFloat(GetFloat);
            getUnitFloat    = new ActionListGetUnitFloat(GetUnitFloat);
            getStringLength = new ActionListGetStringLength(GetStringLength);
            getString       = new ActionListGetString(GetString);
            getBoolean      = new ActionListGetBoolean(GetBoolean);
            getList         = new ActionListGetList(GetList);
            getObject       = new ActionListGetObject(GetObject);
            getGlobalObject = new ActionListGetGlobalObject(GetGlobalObject);
            getEnumerated   = new ActionListGetEnumerated(GetEnumerated);
            getReference    = new ActionListGetReference(GetReference);
            getClass        = new ActionListGetClass(GetClass);
            getGlobalClass  = new ActionListGetGlobalClass(GetGlobalClass);
            getAlias        = new ActionListGetAlias(GetAlias);
            getIntegers     = new ActionListGetIntegers(GetIntegers);
            getDataLength   = new ActionListGetDataLength(GetDataLength);
            getData         = new ActionListGetData(GetData);
            getZString      = new ActionListGetZString(GetZString);

            actionDescriptorSuite     = null;
            this.actionReferenceSuite = actionReferenceSuite;
            this.zstringSuite         = zstringSuite;

            actionLists      = new Dictionary <IntPtr, ActionListItemCollection>(IntPtrEqualityComparer.Instance);
            actionListsIndex = 0;
        }
예제 #2
0
        /// <summary>
        /// Initializes a new instance of the <see cref="ActionDescriptorSuite"/> class.
        /// </summary>
        /// <param name="aete">The AETE scripting information.</param>
        /// <param name="actionListSuite">The action list suite instance.</param>
        /// <param name="actionReferenceSuite">The action reference suite instance.</param>
        /// <param name="zstringSuite">The ASZString suite instance.</param>
        /// <exception cref="ArgumentNullException">
        /// <paramref name="actionListSuite"/> is null.
        /// or
        /// <paramref name="actionReferenceSuite"/> is null.
        /// or
        /// <paramref name="zstringSuite"/> is null.
        /// </exception>
        public ActionDescriptorSuite(PluginAETE aete, IActionListSuite actionListSuite, IActionReferenceSuite actionReferenceSuite,
                                     IASZStringSuite zstringSuite)
        {
            if (actionListSuite == null)
            {
                throw new ArgumentNullException(nameof(actionListSuite));
            }
            if (actionReferenceSuite == null)
            {
                throw new ArgumentNullException(nameof(actionReferenceSuite));
            }
            if (zstringSuite == null)
            {
                throw new ArgumentNullException(nameof(zstringSuite));
            }

            make = new ActionDescriptorMake(Make);
            free = new ActionDescriptorFree(Free);
            handleToDescriptor = new ActionDescriptorHandleToDescriptor(HandleToDescriptor);
            asHandle           = new ActionDescriptorAsHandle(AsHandle);
            getType            = new ActionDescriptorGetType(GetType);
            getKey             = new ActionDescriptorGetKey(GetKey);
            hasKey             = new ActionDescriptorHasKey(HasKey);
            getCount           = new ActionDescriptorGetCount(GetCount);
            isEqual            = new ActionDescriptorIsEqual(IsEqual);
            erase           = new ActionDescriptorErase(Erase);
            clear           = new ActionDescriptorClear(Clear);
            hasKeys         = new ActionDescriptorHasKeys(HasKeys);
            putInteger      = new ActionDescriptorPutInteger(PutInteger);
            putFloat        = new ActionDescriptorPutFloat(PutFloat);
            putUnitFloat    = new ActionDescriptorPutUnitFloat(PutUnitFloat);
            putString       = new ActionDescriptorPutString(PutString);
            putBoolean      = new ActionDescriptorPutBoolean(PutBoolean);
            putList         = new ActionDescriptorPutList(PutList);
            putObject       = new ActionDescriptorPutObject(PutObject);
            putGlobalObject = new ActionDescriptorPutGlobalObject(PutGlobalObject);
            putEnumerated   = new ActionDescriptorPutEnumerated(PutEnumerated);
            putReference    = new ActionDescriptorPutReference(PutReference);
            putClass        = new ActionDescriptorPutClass(PutClass);
            putGlobalClass  = new ActionDescriptorPutGlobalClass(PutGlobalClass);
            putAlias        = new ActionDescriptorPutAlias(PutAlias);
            putIntegers     = new ActionDescriptorPutIntegers(PutIntegers);
            putZString      = new ActionDescriptorPutZString(PutZString);
            putData         = new ActionDescriptorPutData(PutData);
            getInteger      = new ActionDescriptorGetInteger(GetInteger);
            getFloat        = new ActionDescriptorGetFloat(GetFloat);
            getUnitFloat    = new ActionDescriptorGetUnitFloat(GetUnitFloat);
            getStringLength = new ActionDescriptorGetStringLength(GetStringLength);
            getString       = new ActionDescriptorGetString(GetString);
            getBoolean      = new ActionDescriptorGetBoolean(GetBoolean);
            getList         = new ActionDescriptorGetList(GetList);
            getObject       = new ActionDescriptorGetObject(GetObject);
            getGlobalObject = new ActionDescriptorGetGlobalObject(GetGlobalObject);
            getEnumerated   = new ActionDescriptorGetEnumerated(GetEnumerated);
            getReference    = new ActionDescriptorGetReference(GetReference);
            getClass        = new ActionDescriptorGetClass(GetClass);
            getGlobalClass  = new ActionDescriptorGetGlobalClass(GetGlobalClass);
            getAlias        = new ActionDescriptorGetAlias(GetAlias);
            getIntegers     = new ActionDescriptorGetIntegers(GetIntegers);
            getZString      = new ActionDescriptorGetZString(GetZString);
            getDataLength   = new ActionDescriptorGetDataLength(GetDataLength);
            getData         = new ActionDescriptorGetData(GetData);

            this.aete                 = aete;
            this.actionListSuite      = actionListSuite;
            this.actionReferenceSuite = actionReferenceSuite;
            this.zstringSuite         = zstringSuite;
            actionDescriptors         = new Dictionary <IntPtr, ScriptingParameters>(IntPtrEqualityComparer.Instance);
            descriptorHandles         = new Dictionary <IntPtr, ScriptingParameters>(IntPtrEqualityComparer.Instance);
            actionDescriptorsIndex    = 0;
            HandleSuite.Instance.SuiteHandleDisposed += SuiteHandleDisposed;
            disposed = false;
        }