Exemplo n.º 1
0
        /// <summary>
        /// 创建资源应用失败事件。
        /// </summary>
        /// <param name="name">资源名称。</param>
        /// <param name="resourcePackPath">资源包路径。</param>
        /// <param name="errorMessage">错误信息。</param>
        /// <returns>创建的资源应用失败事件。</returns>
        public static ResourceApplyFailureEventArgs Create(string name, string resourcePackPath, string errorMessage)
        {
            ResourceApplyFailureEventArgs resourceApplyFailureEventArgs = ReferencePool.Acquire <ResourceApplyFailureEventArgs>();

            resourceApplyFailureEventArgs.Name             = name;
            resourceApplyFailureEventArgs.ResourcePackPath = resourcePackPath;
            resourceApplyFailureEventArgs.ErrorMessage     = errorMessage;
            return(resourceApplyFailureEventArgs);
        }
Exemplo n.º 2
0
 private void OnResourceApplyFailure(object sender, IResourceApplyFailureEventArgs e)
 {
     EventComponent.This.Fire(this, ResourceApplyFailureEventArgs.Create(e));
 }