예제 #1
0
        public static T GetSet(FuncWrapper creator)
        {
            var value = Get();

            if (value != null)
            {
                return(value);
            }
            value = (T)creator.Execute();
            Set(value);
            return(value);
        }
예제 #2
0
        public static T GetSet(FuncWrapper creator)
        {
            T value;

            return(Get(out value) ? value : (T)creator.Execute());
        }