コード例 #1
0
        /// <summary>
        /// Reports the start of an operation by an external executable.
        /// </summary>
        /// <param name="instanceId">The instance id.</param>
        /// <param name="appType">Type of the application.</param>
        /// <param name="processId">The process id.</param>
        void IPublishingProgressService.ReportStart(Guid instanceId, CreatorApplication appType, int processId)
        {
            try
            {
                var publishRequest = PublishQueueProcessor.RequestTracker.Where(request => request.InstanceId == instanceId).FirstOrDefault();
                if (publishRequest != default(PublishRequest))
                {
                    switch (appType)
                    {
                    case CreatorApplication.CollectionCreator:
                        publishRequest.PublishingCallback         = OperationContext.Current.GetCallbackChannel <IPublishingCallback>();
                        publishRequest.CollectionCreatorProcessId = processId;
                        break;

                    case CreatorApplication.DeepZoomCreator:
                        publishRequest.DeepZoomCreatorProcessId = processId;
                        break;
                    }
                }
            }
            catch (Exception e)
            {
                Globals.TraceMessage(System.Diagnostics.TraceEventType.Error, e.ToString(), string.Format(Properties.Messages.ExceptionInReportStart, instanceId, appType));
            }
        }
コード例 #2
0
 public ActionResult BecomeCreator(CreatorApplication model)
 {
     if (!ModelState.IsValid)
     {
         return(View(model));
     }
     db.CreatorApplications.Add(model);
     db.SaveChanges();
     return(RedirectToAction("Index", "Manage"));
 }
コード例 #3
0
 public override int GetHashCode()
 {
     unchecked
     {
         int result = (Cookie != null ? Cookie.GetHashCode() : 0);
         result = (result * 397) ^ Features.GetHashCode();
         result = (result * 397) ^ (FileFormatVersion != null ? FileFormatVersion.GetHashCode() : 0);
         result = (result * 397) ^ HeaderOffset.GetHashCode();
         result = (result * 397) ^ TimeStamp.GetHashCode();
         result = (result * 397) ^ (CreatorApplication != null ? CreatorApplication.GetHashCode() : 0);
         result = (result * 397) ^ (CreatorVersion != null ? CreatorVersion.GetHashCode() : 0);
         result = (result * 397) ^ CreatorHostOsType.GetHashCode();
         result = (result * 397) ^ PhsyicalSize.GetHashCode();
         result = (result * 397) ^ VirtualSize.GetHashCode();
         result = (result * 397) ^ (DiskGeometry != null ? DiskGeometry.GetHashCode() : 0);
         result = (result * 397) ^ DiskType.GetHashCode();
         result = (result * 397) ^ CheckSum.GetHashCode();
         result = (result * 397) ^ UniqueId.GetHashCode();
         result = (result * 397) ^ SavedState.GetHashCode();
         result = (result * 397) ^ (Reserved != null ? Reserved.GetHashCode() : 0);
         result = (result * 397) ^ (RawData != null ? RawData.GetHashCode() : 0);
         return(result);
     }
 }