private void GenerateOneItemAndContainerSnapshot(IAdminScopeItemContainer container) { SchemaObjectBase obj = container as SchemaObjectBase; string objName = obj.Properties.GetValue("Name", string.Empty); string description = string.Format("对象\"{0}\"({1})", objName, obj.ID); ProcessProgress.Current.StatusText = string.Format("正在生成\"{0}\"({1})所包含的对象", objName, obj.Schema.Name); ProcessProgress.Current.Response(); try { SchemaObjectCollection currentObjects = container.GetCurrentObjects(); SchemaObjectCollection calculatedObjects = this.Calculate(AUConditionAdapter.Instance.Load(obj.ID, AUCommon.ConditionType), description); currentObjects.Merge(calculatedObjects); ProcessProgress.Current.StatusText = string.Format("正在提交\"{0}\"({1})的生成结果", objName, obj.Schema.Name); ProcessProgress.Current.MaxStep += calculatedObjects.Count; ProcessProgress.Current.Response(); AUConditionCalculateResultAdapter.Instance.Update(obj.ID, calculatedObjects); ItemAndContainerSnapshotAdapter.Instance.Merge(obj.ID, obj.SchemaType, currentObjects); } catch (System.Exception ex) { string exPrefix = string.Format("生成{0}时所包含的对象出错:", description); ProcessProgress.Current.Error.WriteLine("{0}: {1}", exPrefix, ex.ToString()); } finally { ProcessProgress.Current.Increment(); ProcessProgress.Current.Response(); } }