bool IStringImport <IMappingTarget> .TryImport(string exportedString, out IMappingTarget outputMappedCharacter) { var parseSuccess = TryImport(exportedString, out CharacterMappingTarget result); outputMappedCharacter = parseSuccess ? result : null; return(parseSuccess); }
public bool TryImport(string exportedString, out IMappingTarget outputMappedHardwareKey) { var parseSuccess = TryImport(exportedString, out HardwareKeyMappingTarget parseResult); outputMappedHardwareKey = parseResult; return(parseSuccess); }
protected Mapping(Configuration globalConfig, IMappingSource source, IMappingTarget target) { GlobalConfig = globalConfig; this.Source = source; this.Target = target; }
public MemberMapping(TypeMapping typeMapping, IMappingSource source, IMappingTarget target) : base(typeMapping.GlobalConfig, source.MemberType, target.MemberType) { this.InstanceTypeMapping = typeMapping; this.SourceMember = source; this.TargetMember = target; }
public bool Equals(IMappingTarget other) { if (other is CharacterMappingTarget charMappingTarget) { return(Equals(charMappingTarget)); } return(Equals(other as HardwareKeyMappingTarget)); }
public MemberMapping GetTypeToMember(Type sourceType, IMappingTarget targetMember) { if (TypeToMemberMappings.TryGetValue(targetMember, out var dict)) { if (dict.TryGetValue(sourceType, out var typeToMemberMapping)) { return(typeToMemberMapping); } } return(null); }
private static bool TryParseSpecial(string exerciseText, ref int iStart, out IMappingTarget mappingTarget) { mappingTarget = null; if (TryGetManualDefinitionText(exerciseText, iStart, out string specialText, out int specialLength)) { var parseSpecialSuccessfull = TryParseManualDefinition(specialText, out mappingTarget); if (parseSpecialSuccessfull) { iStart += specialLength; return(true); } }
#pragma warning disable 1591 // Xml Comments public void Perform(IMappingTarget mappingTarget, object target, object value) { }
/// <summary> /// /// </summary> /// <param name="mappingTarget"></param> /// <param name="target"></param> /// <param name="value"></param> public void Perform(IMappingTarget mappingTarget, object target, object value) { throw new NotImplementedException(); }
#pragma warning disable 1591 // Xml Comments public void Perform(IMappingTarget mappingTarget, object target, object value) { var dynamicTarget = (dynamic)target; dynamicTarget.Id = value; }
#pragma warning disable 1591 // Xml Comments public void Perform(IMappingTarget mappingTarget, object target, object sourceValue) { mappingTarget.SetValue(target, PropertyInfo, sourceValue); }
public TypeMapping(Configuration globalConfig, IMappingSource source, IMappingTarget target) : base(globalConfig, source, target) { this.MemberToMemberMappings = new Dictionary <IMappingTarget, MemberMapping>(); this.TypeToMemberMappings = new Dictionary <IMappingTarget, Dictionary <Type, MemberMapping> >(); }
public KeyMapping(IKeyboardKey keyboardKey, IMappingTarget mappedTarget) { KeyboardKey = keyboardKey; MappingTarget = mappedTarget; }