public MarkerSnapshot MergeOptions(MarkerOptions options) { var properties = new Dictionary <string, object>(Properties); if (options.Properties != null) { foreach (var key in options.Properties.Keys) { properties[key] = options.Properties[key]; } } return(new MarkerSnapshot( options.Range ?? Range, new ReadOnlyDictionary <string, object>(properties), options.Reversed ?? Reversed, options.Tailed ?? Tailed, options.Valid ?? Valid, options.Invalidate ?? Invalidate, options.Exclusive ?? Exclusive, options.Marker ?? Marker)); }
/// <summary> /// Creates and returns a new {Marker} with the same properties as this /// marker. /// </summary> public Marker Copy(MarkerOptions options) { MarkerSnapshot snapshot = GetSnapshot(null); return(Layer.CreateMarker(GetRange(), snapshot.MergeOptions(options))); }