• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C# IStore类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中IStore的典型用法代码示例。如果您正苦于以下问题:C# IStore类的具体用法?C# IStore怎么用?C# IStore使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



IStore类属于命名空间,在下文中一共展示了IStore类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: ProjectService

 public ProjectService(IStore<Project> ps, IStore<Platform> tps, IMappingEngine mapper, ILoggerService log)
 {
     TestProjectStore = ps;
     TestPlatformStore = tps;
     Mapper = mapper;
     Log = log;
 }
开发者ID:hurtonypeter,项目名称:TestPlanner,代码行数:7,代码来源:ProjectService.cs


示例2: InitializationModel

 public InitializationModel(IStore<Player> playerCollection, IStore<RankingDetail> rankingCollection, IStore<Owner> ownerCollection, IStore<BidDetail> bidCollection)
 {
     _playerCollection = playerCollection.FindAll().ToList();
     _rankingCollection = rankingCollection.FindAll().ToList();
     _ownerCollection = ownerCollection.FindAll().ToList();
     _bidCollection = bidCollection;
 }
开发者ID:stevehebert,项目名称:DraftCommander,代码行数:7,代码来源:InitializationModel.cs


示例3: Add

        public void Add(IStore store, StoreData data)
        {
            var datalist = this.datalist;//GetCacheData();

            if (datalist == null)
            {
                return;
            }

            StoreDataEntity entity = new StoreDataEntity
            {
                Store = store
                ,
                Data = data
            };

            string dk = GetDataKey(data.Type, data.Key);

            datalist.AddOrUpdate(dk, entity, (string k, StoreDataEntity oldData) =>
            {
                return entity;
            });

            if (datalist.Count >= this.capacity)
            {
                ThreadPool.QueueUserWorkItem(SaveAsync, null);
            }
        }
开发者ID:sdgdsffdsfff,项目名称:PageCache,代码行数:28,代码来源:StoreDataList.cs


示例4: ReducedContentHandler

 public ReducedContentHandler(IRRConfiguration config, IHostingEnvironmentWrapper hostingEnvironment, IUriBuilder uriBuilder, IStore store)
 {
     this.config = config;
     this.hostingEnvironment = hostingEnvironment;
     this.uriBuilder = uriBuilder;
     this.store = store;
 }
开发者ID:candrews,项目名称:RequestReduce,代码行数:7,代码来源:ReducedContentHandler.cs


示例5: Render

        public bool Render(IStore store, TextWriter output, out Value result)
        {
            bool	halt;

            foreach (KeyValuePair<IEvaluator, INode> branch in this.branches)
            {
                if (branch.Key.Evaluate (store, output).AsBoolean)
                {
                    store.Enter ();

                    halt = branch.Value.Render (store, output, out result);

                    store.Leave ();

                    return halt;
                }
            }

            if (this.fallback != null)
            {
                store.Enter ();

                halt = this.fallback.Render (store, output, out result);

                store.Leave ();

                return halt;
            }

            result = VoidValue.Instance;

            return false;
        }
开发者ID:r3c,项目名称:cottle,代码行数:33,代码来源:IfNode.cs


示例6: TableStateStore

        public TableStateStore(IStore store)
        {
            if (store == null)
                throw new ArgumentNullException("store");

            Store = store;
        }
开发者ID:deveel,项目名称:deveeldb,代码行数:7,代码来源:TableStateStore.cs


示例7: InterceptingStoreDecoration

        /// <summary>
        /// ctor.  requires IStore to wrap
        /// </summary>
        /// <param name="decorated"></param>
        public InterceptingStoreDecoration(IStore decorated, ILogger logger)
            : base(decorated)
        {
            this.Logger = logger;

            //init the intercept chains, wrapping them around the core operations
            this.CommitOperationIntercept = new InterceptChain<ICommitBag, Nothing>((bag) =>
            {
                this.Decorated.Commit(bag);
                return Nothing.VOID;
            });
            this.CommitOperationIntercept.Completed += CommitOperationIntercept_Completed;

            this.GetOperationIntercept = new InterceptChain<IStoredObjectId, IHasId>((x) =>
            {
                return this.Decorated.Get(x);
            });
            this.GetOperationIntercept.Completed += GetOperationIntercept_Completed;

            this.GetAllOperationIntercept = new InterceptChain<Nothing, List<IHasId>>((x) =>
            {
                return this.Decorated.GetAll();
            });
            this.GetAllOperationIntercept.Completed += GetAllOperationIntercept_Completed;
            
            this.SearchOperationIntercept = new InterceptChain<LogicOfTo<IHasId,bool>, List<IHasId>>((x) =>
            {
                return this.Decorated.Search(x);
            });
            this.SearchOperationIntercept.Completed += SearchOperationIntercept_Completed;
        }
开发者ID:Piirtaa,项目名称:Decoratid,代码行数:35,代码来源:InterceptingStoreDecoration.cs


示例8: UssdContext

 public UssdContext(IStore store, UssdRequest request, Dictionary<string, string> data)
 {
     Store = store;
     Request = request;
     Data = data;
     DataBag = new UssdDataBag(Store, DataBagKey);
 }
开发者ID:enokby,项目名称:Smsgh.UssdFramework,代码行数:7,代码来源:UssdContext.cs


示例9: StoreInfoPage

		public StoreInfoPage(IStore store, ContentMode mode = ContentMode.View)
		{
			//Setup view model
			this.ViewModel = MvxToolbox.LoadViewModel<StoreInfoViewModel>();
			this.ViewModel.Store = store;
			this.ViewModel.Mode = mode;

			InitializeComponent();

			//Setup Header
			this.HeaderView.BindingContext = this.ViewModel;

			//Setup events
			this.listView.ItemSelected += itemSelected;
			this.ViewModel.Products.ReloadFinished += (sender, e) =>
			{
				this.listView.EndRefresh();
			};

			//Setup view model actions
			this.ViewModel.ShowStoreDetailsAction = async (s) =>
			{
				await this.Navigation.PushAsync(new StoreDetailsPage(s, mode));
			};

			this.ViewModel.AddProductAction = async (p, s) =>
			{
				await this.Navigation.PushModalAsync(new NavigationPage(new SaveProductPage(p, s)));
			};
		}
开发者ID:fadafido,项目名称:tojeero,代码行数:30,代码来源:StoreInfoPage.xaml.cs


示例10: ProjectVersionService

 public ProjectVersionService(IStore<Project> projectStore, IStore<ProjectVersion> projectVersionStore, IMappingEngine mapper, ILoggerService log)
 {
     ProjectStore = projectStore;
     ProjectVersionStore = projectVersionStore;
     Mapper = mapper;
     Log = log;
 }
开发者ID:hurtonypeter,项目名称:TestPlanner,代码行数:7,代码来源:ProjectVersionService.cs


示例11: MainViewModel

        /// <summary>
        /// Initializes a new instance of the MainViewModel class.
        /// </summary>
        public MainViewModel(IStore store, INavigationService nav)
        {
            this.store = store;
            this.nav = nav;

            this.Groups = new ObservableCollection<Group>();
        }
开发者ID:bezysoftware,项目名称:MVVM-Navigation,代码行数:10,代码来源:MainViewModel.cs


示例12: DetailViewModel

        // If you care for what's inside your TInitializer model,
        // add the parameter to the ctor of the view.
        // Compare to ListViewModel - where we're not interested in the model.
        public DetailViewModel(IStore store, ShowCustomerDetails args)
        {
            _store = store;

            var c = _store.LoadCustomer(args.CustomerId);
            Console.WriteLine("Customer details: {0}, {1}", c.Name, c.Birthday);
        }
开发者ID:AZiegler71,项目名称:ViewModelResolver,代码行数:10,代码来源:DetailViewModel.cs


示例13: OnHandle

    public override void OnHandle(IStore store,
                                  string collection,
                                  JObject command,
                                  JObject document)
    {
      IObjectStore st = store.GetCollection(collection);

      if (document.Type == JTokenType.Array)
      {
        var documents = document.Values();
        if (documents != null)
          foreach (JObject d in documents)
          {
            var k = d.Property(DocumentMetadata.IdPropertyName);
            if (k != null)
              st.Set((string)k, d);
          }

      }
      else
      {
        var k = document.Property(DocumentMetadata.IdPropertyName);
        if (k != null)
          st.Set((string)k, document);
      }
    }
开发者ID:dronab,项目名称:DensoDB,代码行数:26,代码来源:SetManyHandler.cs


示例14: Set

        // A method that handles densodb events MUST have this delegate.
        public static void Set(IStore dbstore, BSonDoc command)
        {
            // IStore interface gives you a lowlevel access to DB Structure,
              // Every action you take now will jump directly into DB without any event dispatching

              // The Istore is preloaded from densodb, and you should not have access to densodb internals.

              // Now deserialize message from Bson object.
              // should be faster using BsonObject directly but this way is more clear.
              var message = command.FromBSon<Message>();

              // Get the sender UserProfile
              var userprofile = dbstore.GetCollection("users").Where(d => d["UserName"].ToString() == message.From).FirstOrDefault().FromBSon<UserProfile>();

              if (userprofile != null)
              {
            // add message to user's messages
            var profilemessages = dbstore.GetCollection(string.Format("messages_{0}", userprofile.UserName));
            profilemessages.Set(command);

            // add message to user's wall
            var profilewall = dbstore.GetCollection(string.Format("wall_{0}", userprofile.UserName));
            profilewall.Set(command);

            // Now i have user's follower.
            foreach (var follower in userprofile.FollowedBy)
            {
              // Get followers's wall
              var followerwall = dbstore.GetCollection(string.Format("wall_{0}", follower));

              // store the messages in follower's wall.
              followerwall.Set(command);
            }
              }
        }
开发者ID:MohammadHabbab,项目名称:DensoDB,代码行数:36,代码来源:NewMessageHandler.cs


示例15: MessagingModule

        public MessagingModule(Config cfg, IStore store)
            : base("/Admin/Messaging")
        {
            Get["/"] = _ => View["Admin/Messaging/Index"];
            Get["/Messages"] = _ => Response.AsJson(new { store.Messages });
            Get["/Message/{message}/"] = _ =>
            {
                Type t = store.ResolveMessageType(_.message);
                string kind = "other";
                if (typeof(Neva.Messaging.IQuery).IsAssignableFrom(t)) kind = "Query";
                if (typeof(Neva.Messaging.ICommand).IsAssignableFrom(t)) kind = "Command";
                if (typeof(Neva.Messaging.IEvent).IsAssignableFrom(t)) kind = "Event";

                return Response.AsJson(new
                {
                    Name = _.message,
                    Kind = kind,
                    Properties = t.GetProperties().Select(p => new
                    {
                        p.Name,
                        p.PropertyType,
                        IsXml = p.GetCustomAttributes(typeof(XmlAttribute), false).Length > 0
                    })
                });
            };
        }
开发者ID:maxime-paquatte,项目名称:MultiRando,代码行数:26,代码来源:MessagingModule.cs


示例16: StoreManageForm

        /// <summary>
        /// Creates a new store management window.
        /// </summary>
        /// <param name="store">The <see cref="IStore"/> to manage.</param>
        /// <param name="feedCache">Information about implementations found in the <paramref name="store"/> are extracted from here.</param>
        public StoreManageForm([NotNull] IStore store, [NotNull] IFeedCache feedCache)
        {
            #region Sanity checks
            if (store == null) throw new ArgumentNullException("store");
            if (feedCache == null) throw new ArgumentNullException("feedCache");
            #endregion

            _store = store;
            _feedCache = feedCache;

            InitializeComponent();
            buttonRunAsAdmin.AddShieldIcon();

            HandleCreated += delegate
            {
                Program.ConfigureTaskbar(this, Text, subCommand: ".Store.Manage", arguments: StoreMan.Name + " manage");
                if (Locations.IsPortable) Text += @" - " + Resources.PortableMode;
                if (WindowsUtils.IsAdministrator) Text += @" (Administrator)";
                else if (WindowsUtils.IsWindowsNT) buttonRunAsAdmin.Visible = true;
            };

            Shown += delegate { RefreshList(); };

            _treeView.SelectedEntryChanged += OnSelectedEntryChanged;
            _treeView.CheckedEntriesChanged += OnCheckedEntriesChanged;
            splitContainer.Panel1.Controls.Add(_treeView);
        }
开发者ID:modulexcite,项目名称:0install-win,代码行数:32,代码来源:StoreManageForm.cs


示例17: Process

 /// <summary>
 /// Process USSD requests. Automatically routes to nested routes.
 /// </summary>
 /// <param name="store">Session store</param>
 /// <param name="request"></param>
 /// <param name="initiationController">Initiation controller</param>
 /// <param name="initiationAction">Initiation action</param>
 /// <param name="data">Data available to controllers</param>
 /// <param name="loggingStore">Logging store</param>
 /// <param name="arbitraryLogData">Arbitrary data to add to session log</param>
 /// <returns></returns>
 public static async Task<UssdResponse> Process(IStore store, UssdRequest request,
     string initiationController, string initiationAction,
     Dictionary<string, string> data = null, ILoggingStore loggingStore = null, string arbitraryLogData = null)
 {
     return
             await
                 ProcessRequest(store, request, initiationController, initiationAction, data, loggingStore,
                     arbitraryLogData);
     // TODO: auto process sub dial
     //var messages = GetInitiationMessages(request);
     //if (messages == null)
     //{
     //    return
     //        await
     //            ProcessRequest(store, request, initiationController, initiationAction, data, loggingStore,
     //                arbitraryLogData);
     //}
     //UssdResponse response = null;
     //for (int i = 0; i < messages.Count; i++)
     //{
     //    request.Message = messages[i];
     //    if (i != 0) request.Type = UssdRequestTypes.Response.ToString();
     //    bool dispose = (i == messages.Count-1);
     //    response =
     //        await
     //            ProcessRequest(store, request, initiationController, initiationAction, data, loggingStore,
     //                arbitraryLogData, dispose);
     //}
     //return response;
 }
开发者ID:enokby,项目名称:Smsgh.UssdFramework,代码行数:41,代码来源:Ussd.cs


示例18: StreamJournalWriter

 public StreamJournalWriter(IStore storage, EngineConfiguration config)
 {
     _config = config;
     _storage = storage;
     _journalFormatter = config.CreateFormatter(FormatterUsage.Journal);
     _rolloverStrategy = _config.CreateRolloverStrategy();
 }
开发者ID:NerdPad,项目名称:OrigoDB,代码行数:7,代码来源:StreamJournalWriter.cs


示例19: CopyItems

 /// <summary>
 /// copies items between stores
 /// </summary>
 /// <param name="store"></param>
 /// <param name="storeToMoveTo"></param>
 /// <param name="itemsToMove"></param>
 public static void CopyItems(this IStore store, IStore storeToMoveTo, List<StoredObjectId> itemsToMove)
 {
     itemsToMove.WithEach(x =>
     {
         CopyItem(store, storeToMoveTo, x);
     });
 }
开发者ID:Piirtaa,项目名称:Decoratid,代码行数:13,代码来源:StoreExtensions.cs


示例20: StoreDetail

 public StoreDetail(IStore s)
 {
     Id = s.Id;
     SizeLimit = s.SizeLimit;
     CurrentSize = s.CurrentSize;
     Label = s.Label;
 }
开发者ID:Garwin4j,项目名称:BrightstarDB,代码行数:7,代码来源:StoreDetail.cs



注:本文中的IStore类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# IStoreContext类代码示例发布时间:2022-05-24
下一篇:
C# IStorageService类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap