public TracingConfiguration Unwrap(Func <double> random, INamedDataCollection metadata) { Contract.Requires(random != null); Contract.Requires(metadata != null); Contract.Ensures(Contract.Result <TracingConfiguration>() != null); Contract.Assume(MergeSearchAngle != null); Contract.Assume(SegmentLength != null); Contract.Assume(RoadWidth != null); Contract.Assume(PriorityField != null); Contract.Assume(SeparationField != null); Contract.Assume(TensorField != null); return(new TracingConfiguration( PriorityField.Unwrap(), SeparationField.Unwrap(), TensorField.Unwrap(random, metadata), IValueGeneratorContainer.FromObject(RoadWidth), MathHelper.ToRadians(IValueGeneratorContainer.FromObject(MergeSearchAngle).SelectFloatValue(random, metadata)), IValueGeneratorContainer.FromObject(SegmentLength).SelectFloatValue(random, metadata), IValueGeneratorContainer.FromObject(MergeDistance).SelectFloatValue(random, metadata))); }
void ReleaseDesignerOutlets() { if (ServiceOptionsLabel != null) { ServiceOptionsLabel.Dispose(); ServiceOptionsLabel = null; } if (ProtocolLabel != null) { ProtocolLabel.Dispose(); ProtocolLabel = null; } if (RecordNameLabel != null) { RecordNameLabel.Dispose(); RecordNameLabel = null; } if (PortField != null) { PortField.Dispose(); PortField = null; } if (RecordNameField != null) { RecordNameField.Dispose(); RecordNameField = null; } if (PriorityField != null) { PriorityField.Dispose(); PriorityField = null; } if (ProtocolOptionsField != null) { ProtocolOptionsField.Dispose(); ProtocolOptionsField = null; } if (ServiceOptionsField != null) { ServiceOptionsField.Dispose(); ServiceOptionsField = null; } if (TargetHostField != null) { TargetHostField.Dispose(); TargetHostField = null; } if (WeightField != null) { WeightField.Dispose(); WeightField = null; } }