Exemplo n.º 1
0
        public DiversionAttribute([CallerMemberName] string callerName = null)
        {
            if (Diversion.DefaultDiverter.IsEnum <MarshalOption>())
            {
                SelectedDiverter = Diversion.DefaultDiverter.ToEnum <MarshalOption>();
            }

            SelectionKey = Diversion.DefaultDiverter;
            MarshalInfo  = Diversion.GetInfo(SelectedDiverter);
            _Logger.Debug($"{nameof(DiversionAttribute)}: method \"{callerName}\" is using the default diverter option '{Diversion.DefaultDiverter}'.");
        }
Exemplo n.º 2
0
        public DiversionAttribute(MarshalOption option, string optionKey = null)
        {
            SelectedDiverter = option;

            if (option == MarshalOption.UserDefined)
            {
                SelectionKey = optionKey;
                MarshalInfo  = Diversion.GetInfo(optionKey);
            }
            else
            {
                MarshalInfo = Diversion.GetInfo(SelectedDiverter);
            }
        }