Execute() 공개 메소드

Execute the inventory write request
public Execute ( ) : void
리턴 void
        public bool ArchiveInventory(
            Guid id, string firstName, string lastName, string invPath, Stream saveStream,
            Dictionary <string, object> options)
        {
            UserAccount userInfo = m_registry.RequestModuleInterface <IUserAccountService>()
                                   .GetUserAccount(null, firstName, lastName);

            if (userInfo != null)
            {
                try
                {
                    bool UseAssets = true;
                    if (options.ContainsKey("assets"))
                    {
                        object Assets = null;
                        options.TryGetValue("assets", out Assets);
                        bool.TryParse(Assets.ToString(), out UseAssets);
                    }

                    string checkPermissions = "";;
                    if (options.ContainsKey("checkPermissions"))
                    {
                        Object temp;
                        if (options.TryGetValue("checkPermissions", out temp))
                        {
                            checkPermissions = temp.ToString().ToUpper();
                        }
                    }

                    var saveArchive = new InventoryArchiveWriteRequest(
                        id,
                        this,
                        m_registry,
                        userInfo,
                        invPath,
                        saveStream,
                        UseAssets,
                        null,
                        new List <AssetBase>(),
                        checkPermissions);

                    saveArchive.Execute();
                }
                catch (EntryPointNotFoundException e)
                {
                    MainConsole.Instance.ErrorFormat(
                        "[ARCHIVER]: Mismatch between Mono and zlib1g library version when trying to create compression stream."
                        + "If you've manually installed Mono, have you appropriately updated zlib1g as well?");
                    MainConsole.Instance.Error(e);

                    return(false);
                }

                return(true);
            }

            return(false);
        }
        public bool ArchiveInventory(
            Guid id, string firstName, string lastName, string invPath, Stream saveStream,
            Dictionary<string, object> options)
        {
            UserAccount userInfo = m_registry.RequestModuleInterface<IUserAccountService>()
                                             .GetUserAccount(null, firstName, lastName);

            if (userInfo != null)
            {
                try
                {
                    bool UseAssets = true;
                    if (options.ContainsKey("assets"))
                    {
                        object Assets;
                        options.TryGetValue("assets", out Assets);
                        bool.TryParse(Assets.ToString(), out UseAssets);
                    }

                    string checkPermissions = "";
                    if (options.ContainsKey("checkPermissions"))
                    {
                        Object temp;
                        if (options.TryGetValue("checkPermissions", out temp))
                            checkPermissions = temp.ToString().ToUpper();
                    }

                    var saveArchive = new InventoryArchiveWriteRequest(
                        id,
                        this,
                        m_registry,
                        userInfo,
                        invPath,
                        saveStream,
                        UseAssets,
                        null,
                        new List<AssetBase>(),
                        checkPermissions);

                    saveArchive.Execute();
                }
                catch (EntryPointNotFoundException e)
                {
                    MainConsole.Instance.ErrorFormat(
                        "[Archiver]: Mismatch between Mono and zlib1g library version when trying to create compression stream."
                        + "If you've manually installed Mono, have you appropriately updated zlib1g as well?");
                    MainConsole.Instance.Error(e);

                    return false;
                }

                return true;
            }

            return false;
        }