private void UpdateReceiverComponentName(Object component) { if (receiver != null) { MatchCollection matches = parenteshesPattern.Matches(component.ToString()); if (matches != null && matches.Count == 1) { ReceiverComponentName = matches[0].Value; ReceiverComponentName = ReceiverComponentName.Substring(1, ReceiverComponentName.Length - 2); int lastDot = ReceiverComponentName.LastIndexOf('.') + 1; ReceiverComponentNameSimple = ReceiverComponentName.Substring(lastDot, ReceiverComponentName.Length - lastDot); } } }
private void UpdateReceiverComponentName(Object component) { if (Receiver != null) { MatchCollection matches = parenteshesPattern.Matches(component.ToString()); if (matches != null && matches.Count > 0) { ReceiverComponentName = matches[matches.Count - 1].Value; if (ReceiverComponentName.Length > 1) { ReceiverComponentName = ReceiverComponentName.Remove(0, 1); } ReceiverComponentName = ReceiverComponentName.Replace(")", "."); } } }