当前位置: 首页>>代码示例>>C#>>正文


C# IStore类代码示例

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


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


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