本文整理汇总了C#中ICloningContext类的典型用法代码示例。如果您正苦于以下问题:C# ICloningContext类的具体用法?C# ICloningContext怎么用?C# ICloningContext使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ICloningContext类属于命名空间,在下文中一共展示了ICloningContext类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: MammographyImageSpatialTransform
/// <summary>
/// Cloning constructor.
/// </summary>
/// <param name="source">The source object from which to clone.</param>
/// <param name="context">The cloning context object.</param>
protected MammographyImageSpatialTransform(MammographyImageSpatialTransform source, ICloningContext context)
: base(source, context)
{
context.CloneFields(source, this);
_imagePosterior = new Vector3D(source._imagePosterior);
}
示例2: SimpleDataModalityLut
/// <summary>
/// Cloning constructor.
/// </summary>
/// <param name="source">The source object from which to clone.</param>
/// <param name="context">The cloning context object.</param>
protected SimpleDataModalityLut(SimpleDataModalityLut source, ICloningContext context)
{
context.CloneFields(source, this);
//clone the actual buffer
_data = (double[]) source._data.Clone();
}
示例3: MammogramAnnotationLayoutProxy
/// <summary>
/// Cloning constructor.
/// </summary>
/// <param name="source">The source object from which to clone.</param>
/// <param name="context">The cloning context object.</param>
protected MammogramAnnotationLayoutProxy(MammogramAnnotationLayoutProxy source, ICloningContext context)
{
context.CloneFields(source, this);
// clone the annotation boxes with their state!
if (source._annotationBoxes != null)
{
var annotationBoxes = new Dictionary<object, AnnotationBox>();
foreach (var sourceBox in source._annotationBoxes.Values)
{
var cloneBox = (AnnotationBox) CloneBuilder.Clone(sourceBox);
// if the box has an item, use the item's identifier as the key
object key = cloneBox;
if (cloneBox.AnnotationItem != null)
{
key = cloneBox.AnnotationItem.GetIdentifier();
// if for some reason the key is a duplicate, use the box as the key (but keep it as part of the layout!)
if (annotationBoxes.ContainsKey(key))
key = cloneBox;
}
annotationBoxes.Add(key, cloneBox);
}
_annotationBoxes = annotationBoxes;
}
}
示例4: ColorMapManagerProxy
/// <summary>
/// Cloning constructor.
/// </summary>
/// <param name="source">The source object from which to clone.</param>
/// <param name="context">The cloning context object.</param>
protected ColorMapManagerProxy(ColorMapManagerProxy source, ICloningContext context)
{
context.CloneFields(source, this);
_placeholderColorMapManager = new ColorMapManager(_placeholderColorMapInstaller = source._placeholderColorMapInstaller.Clone());
_layerOpacityManager = new XLayerOpacityManager(this);
}
示例5: FusionOverlayCompositeGraphic
/// <summary>
/// Cloning constructor.
/// </summary>
/// <param name="source">The source object from which to clone.</param>
/// <param name="context">The cloning context object.</param>
protected FusionOverlayCompositeGraphic(FusionOverlayCompositeGraphic source, ICloningContext context)
{
context.CloneFields(source, this);
_overlayFrameDataReference = source._overlayFrameDataReference.Clone();
_overlayFrameDataReference.FusionOverlayFrameData.Unloaded += HandleOverlayFrameDataUnloaded;
}
示例6: FusionPresentationImage
/// <summary>
/// Cloning constructor.
/// </summary>
/// <param name="source">The source object from which to clone.</param>
/// <param name="context">The cloning context object.</param>
protected FusionPresentationImage(FusionPresentationImage source, ICloningContext context) : base(source, context)
{
context.CloneFields(source, this);
_baseFrameReference = source._baseFrameReference.Clone();
_overlayFrameDataReference = source._overlayFrameDataReference.Clone();
}
示例7: AsyncDicomGrayscalePresentationImage
protected AsyncDicomGrayscalePresentationImage(DicomGrayscalePresentationImage source, ICloningContext context)
: base(source, context)
{
context.CloneFields(source, this);
Initialize();
}
示例8: RoiCalloutGraphic
/// <summary>
/// Cloning constructor.
/// </summary>
/// <param name="source">The source object from which to clone.</param>
/// <param name="context">The cloning context object.</param>
protected RoiCalloutGraphic(RoiCalloutGraphic source, ICloningContext context)
: base(source, context)
{
context.CloneFields(source, this);
_roiAnalyzers.AddRange(source._roiAnalyzers);
foreach(var analyzer in _roiAnalyzers)
{
analyzer.SetRoiAnalyzerUpdateCallback(Refresh);
}
}
示例9: RootModelSpatialTransform
/// <summary>
/// Cloning constructor.
/// </summary>
/// <param name="source">The source object from which to clone.</param>
/// <param name="context">The cloning context object.</param>
protected RootModelSpatialTransform(RootModelSpatialTransform source, ICloningContext context)
: base(source, context)
{
context.CloneFields(source, this);
_rootTransform3D.ParentTransform = this;
if (source._cumulativeTransform3D != null)
_cumulativeTransform3D = source._cumulativeTransform3D.Clone();
}
示例10: ExtensionData
/// <summary>
/// Cloning constructor.
/// </summary>
private ExtensionData(ExtensionData source, ICloningContext context)
{
_data = new Dictionary<Type, object>();
foreach (var sourceData in source._data)
{
var valueClone = CloneBuilder.Clone(sourceData.Value);
if (valueClone != null)
_data[sourceData.Key] = valueClone;
}
}
示例11: SpatialTransform
/// <summary>
/// Cloning constructor.
/// </summary>
protected SpatialTransform(SpatialTransform source, ICloningContext context)
{
context.CloneFields(source, this);
if (source._cumulativeTransform != null)
_cumulativeTransform = source._cumulativeTransform.Clone();
if (source._transform != null)
_transform = source._transform.Clone();
}
示例12: GeometricShuttersGraphic
/// <summary>
/// Cloning constructor.
/// </summary>
/// <param name="source">The source object from which to clone.</param>
/// <param name="context">The cloning context object.</param>
protected GeometricShuttersGraphic(GeometricShuttersGraphic source, ICloningContext context)
: this(source._imageRectangle.Height, source._imageRectangle.Width)
{
context.CloneFields(source, this);
foreach (GeometricShutter shutter in source._customShutters)
_customShutters.Add(shutter.Clone());
foreach (GeometricShutter shutter in source._dicomShutters)
_dicomShutters.Add(shutter.Clone());
}
示例13: StoredAnnotationLayout
/// <summary>
/// Cloning constructor.
/// </summary>
/// <param name="source">The source object from which to clone.</param>
/// <param name="context">This parameter is unused.</param>
private StoredAnnotationLayout(StoredAnnotationLayout source, ICloningContext context)
{
this._identifier = source._identifier;
this._visible = source._visible;
foreach (StoredAnnotationBoxGroup group in source._annotationBoxGroups)
{
if (group == null)
continue;
this._annotationBoxGroups.Add(group.Clone());
}
}
示例14: MultiplexedConstructor
/// <summary>
/// Creates a new <see cref="MultiplexedConstructor"/>.
/// </summary>
/// <param name="cloningContext">cloning context.</param>
/// <param name="constructor">Constructor to multiplex.</param>
private MultiplexedConstructor(ICloningContext cloningContext, MethodDefinition constructor)
{
Contract.Requires(cloningContext != null);
Contract.Requires(constructor != null);
Contract.Ensures(this.CloningContext != null);
Contract.Ensures(this.Constructor != null);
Contract.Ensures(this.Variables != null);
this.CloningContext = cloningContext;
this.Constructor = constructor;
this.ThisParameter = constructor.Body.ThisParameter;
this.Variables = new List<VariableDefinition>(constructor.Body.Variables);
}
示例15: MammogramAnnotationLayoutProxy
/// <summary>
/// Cloning constructor.
/// </summary>
/// <param name="source">The source object from which to clone.</param>
/// <param name="context">The cloning context object.</param>
protected MammogramAnnotationLayoutProxy(MammogramAnnotationLayoutProxy source, ICloningContext context)
{
context.CloneFields(source, this);
// clone the annotation boxes with their state!
if (source._annotationBoxes != null)
{
var annotationBoxes = new Dictionary<object, AnnotationBox>();
foreach (var sourceBox in source._annotationBoxes.Values)
{
var cloneBox = (AnnotationBox) CloneBuilder.Clone(sourceBox);
if (cloneBox.AnnotationItem != null)
annotationBoxes.Add(cloneBox.AnnotationItem.GetIdentifier(), cloneBox);
else
annotationBoxes.Add(cloneBox, cloneBox);
}
_annotationBoxes = annotationBoxes;
}
}