本文整理汇总了C#中IServer类的典型用法代码示例。如果您正苦于以下问题:C# IServer类的具体用法?C# IServer怎么用?C# IServer使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
IServer类属于命名空间,在下文中一共展示了IServer类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: ConsoleOutputTask
protected ConsoleOutputTask(IServer server, IEventAggregator events)
: base(events)
{
this.server = server;
Console = new BindableCollection<string>();
server.CurrentDatabaseChanged += delegate { ClearConsole(); };
}
开发者ID:nzdunic,项目名称:ravendb,代码行数:7,代码来源:ConsoleOutputTask.cs
示例2: UserQuitEventArgs
public UserQuitEventArgs(IUser user, IChannel channel, IServer server, string reason = null)
{
this.User = user;
this.Channel = channel;
this.Server = server;
this.Reason = reason;
}
开发者ID:pjmagee,项目名称:NazureBot,代码行数:7,代码来源:UserQuitEventArgs.cs
示例3: Account
public Account(string username, string passwordHash, ICountry country, IServer server)
{
Username = username;
PasswordHash = passwordHash;
Country = country;
Server = server;
}
开发者ID:ebeeb,项目名称:SfSdk,代码行数:7,代码来源:Account.cs
示例4: AddServer
public void AddServer(IServer server)
{
TreeIter iter = Store.Append();
//Store.SetValue(iter, 0, new Gdk.Pixbuf...)
Store.SetValue(iter, 1, server.Name);
Store.SetValue(iter, 2, server);
}
开发者ID:vrosnet,项目名称:logopathy,代码行数:7,代码来源:ServerListView.cs
示例5: RemoveMethodFromNewClientEvent
protected static void RemoveMethodFromNewClientEvent(IServer server, ClientConnectedEventHandler clientConnectedEventHandler)
{
lock (clientConnectedEventHandler)
{
server.NewClientEvent -= clientConnectedEventHandler;
}
}
开发者ID:ionhristiniuc,项目名称:chatapp,代码行数:7,代码来源:ServerPeerConnection.cs
示例6: AddMethodToNewClientEvent
protected static void AddMethodToNewClientEvent(IServer server, ClientConnectedEventHandler clientConnectedEventHandler)
{
lock (newClientEventMonitor)
{
server.NewClientEvent += clientConnectedEventHandler;
}
}
开发者ID:ionhristiniuc,项目名称:chatapp,代码行数:7,代码来源:ServerPeerConnection.cs
示例7: Connector
public Connector(IServer server, string ip, int port)
{
Connections = new List<IWebSocketConnection>();
_server = server;
_ip = ip;
_port = port;
}
开发者ID:jamie-tigereye,项目名称:DDPServer.Net,代码行数:7,代码来源:Connector.cs
示例8: PacketManager
public PacketManager(TextWriter logger, IServer server)
{
Logger = logger;
Server = server;
_packetHandlers = new Dictionary<DataIdentifier, Func<EndPoint, ChatPacket, ChatPacket>>();
}
开发者ID:treytomes,项目名称:ASCIIWorld2,代码行数:7,代码来源:PacketManager.cs
示例9: PadInt
public PadInt(int txid, int uid, IServer server, int version)
{
_txid = txid;
_uid = uid;
_server = server;
_version = version;
}
开发者ID:rtfpessoa,项目名称:padi-dstm,代码行数:7,代码来源:PadInt.cs
示例10: BaseConnection
/// <summary>
/// Add an socket to "server"-Server-Instance and register it
/// </summary>
/// <param name="ep">Socket to register</param>
/// <param name="server">Server-Instance</param>
public BaseConnection(Socket client, IServer server)
{
if (client == null)
throw new ArgumentNullException("client");
if (server == null)
throw new ArgumentNullException("server");
// this._encoding = Encoding.GetEncoding(28591);// iso_8859-1
this.handler = client;
this._server = server;
/*
int id = this.rnd.Next();
while (server.HasID(id) || server.SeedID(id)) // new seed id
{
id = this.rnd.Next();
}
this._id = id;
#if UNSTABLE
SocketManager socketManager = ((BaseServer)this._server).SocketManager;
socketManager.AddConnection(this);
#else
ThreadPool.QueueUserWorkItem(new WaitCallback(this.RecieveProc), null); // to/do: 25 Thread Limit!!!!
#endif
this.available = true;
Console.WriteLine("new BaseConnection with id: {0}, is availbale", id);*/
this.Initialize();
}
开发者ID:BackupTheBerlios,项目名称:storm-ircd-svn,代码行数:37,代码来源:BaseConnection.cs
示例11: Use
public void Use(IServer server, string commandName, string[] tokens)
{
if (tokens.Length < 1)
{
Help(server);
return;
}
var toKick = server.GetClients();
if (toKick.Any() && tokens[0].ToLower() != "all")
{
foreach (var client1 in toKick.Where(client1 => !client1.GetOwner().CanUseCommand("chraft.kick.exempt")))
{
client1.Kick(tokens.Length > 1 ? tokens[1] : "Kicked");
server.GetLogger().Log(LogLevel.Info, "Kicked " + client1.GetOwner().Name);
}
}
else
{
foreach (IClient t in toKick.Where(t => t.GetOwner().Name.ToLower() == tokens[0].ToLower()).Where(t => !t.GetOwner().CanUseCommand("chraft.kick.exempt")))
{
t.Kick(tokens.Length > 1 ? tokens[1] : "Kicked");
server.GetLogger().Log(LogLevel.Info, "Kicked " + t.GetOwner().Name);
}
}
}
开发者ID:TheaP,项目名称:c-raft,代码行数:28,代码来源:CmdKick.cs
示例12: Run
public void Run(int port) {
using (var mefContainer = SetupMefContainer()) {
var server = mefContainer.GetExportedValue<IServer>();
Instance = server; // For debugging only.
server.Run(port);
}
}
开发者ID:kleopatra999,项目名称:vs-chromium,代码行数:7,代码来源:ServerStub.cs
示例13: GetModel
private Model GetModel(IServer server)
{
RequiresNotNull(server);
var r = server.PollCurrentStatus();
var model = new Model(r);
return model;
}
开发者ID:jairov4,项目名称:Yorkfield,代码行数:7,代码来源:MainServerWebMonitor.cs
示例14: Start
/// <summary>
/// Starts the specified server.
/// </summary>
/// <param name="server">The server.</param>
public void Start(IServer server)
{
RequiresNotNull(server);
var instructions = new BuildInstructions(Guid.Empty, string.Empty, string.Empty);
try
{
instructions = GetBuildInstructions(server);
BuildProject(server, instructions);
ExecuteNUnitTestRunner(server, instructions);
}
catch (FileNotFoundException e)
{
log.Log(LogSeverity.Error, $"The file was not found: {e.FileName}");
var status = new ClientInformation(Environment.MachineName, instructions.Session, BuildStatus.Failed,
new TestResult[0]);
server.UpdateClientStatus(status);
}
catch (Win32Exception e)
{
log.Log(LogSeverity.Error, $"Error launching the build process: {e.Message}");
var status = new ClientInformation(Environment.MachineName, instructions.Session, BuildStatus.Failed,
new TestResult[0]);
server.UpdateClientStatus(status);
}
catch (ApplicationException e)
{
log.Log(LogSeverity.Error, $"Error building the project: {e.Message}");
var status = new ClientInformation(Environment.MachineName, instructions.Session, BuildStatus.Failed,
new TestResult[0]);
server.UpdateClientStatus(status);
}
}
开发者ID:jairov4,项目名称:Yorkfield,代码行数:36,代码来源:MainClient.cs
示例15: SelectDatabaseViewModel
public SelectDatabaseViewModel(IServer server, IEventAggregator events)
: base(events)
{
DisplayName = "Home";
Server = server;
ShowCreateDatabaseForm = Visibility.Collapsed;
}
开发者ID:nzdunic,项目名称:ravendb,代码行数:7,代码来源:SelectDatabaseViewModel.cs
示例16: LinqEditorViewModel
public LinqEditorViewModel(IServer server)
{
DisplayName = "Query";
this.server = server;
Query = "from doc in docs " + Environment.NewLine + "select doc";
}
开发者ID:eldersantos,项目名称:ravendb,代码行数:7,代码来源:LinqEditorViewModel.cs
示例17: OnClose
public void OnClose(IServer server)
{
NumOnCloseEvents++;
if (OnCloseAction != null)
OnCloseAction();
}
开发者ID:rainbowlee,项目名称:kayak,代码行数:7,代码来源:ServerDelegate.cs
示例18: EditCollectionTemplateViewModel
public EditCollectionTemplateViewModel(IServer server, IEventAggregator events,
IDocumentTemplateProvider templateProvider)
{
this.server = server;
this.events = events;
this.templateProvider = templateProvider;
}
开发者ID:nzdunic,项目名称:ravendb,代码行数:7,代码来源:EditCollectionTemplateViewModel.cs
示例19: Generate
/// <summary>
/// Generates a complete new ring into the provided <paramref name="ring" /> dataset. This should produce a complete 24 hour active ring which has no
/// other logic then playing the right things at the right time, independet of the past.
/// </summary>
/// <param name="server">The source database</param>
/// <param name="computerName">The name of the computer this ring is generated for.</param>
/// <param name="ring">The target ring where all the generated data should be inserted at.</param>
/// <remarks>
/// Things which need to be done:
/// <para>Set <see cref="RingMetaData.SenderId" /> to the targeting sender id.</para>
/// <para>Generate <see cref="PageGroup" />s inside the database.</para>
/// <para>
/// Generate <see cref="Page" />s with the associated content (<see cref="Text" />, <see cref="Image" /> <see cref="Video" />,
/// <see cref="DoubleTransition" />).
/// </para>
/// <para>
/// Generate <see cref="PageSchedule" />s. <see cref="PageSchedule" />s in sequence which belongs to the same <see cref="PageGroup" /> needs to
/// have the same <see cref="PageSchedule.PageGroupScheduleId" />.
/// </para>
/// </remarks>
public void Generate(IServer server, string computerName, RingMetaData ring)
{
//if (DateTime.Now - server.Load<DateTime>("LastRefresh") > TimeSpan.FromDays(1))
// server.Save(StorageEnum.MultiMedia, null);
//server.Save(StorageEnum.MultiMedia, null); //TODO Clears the current multimedia db
MultiMedia db = GetMultiMedia(server);
MMSender sender = GetMMSenderFromSenderOrComputerName(db, computerName);
ring.Occasion = sender.NameId;
ring.SenderId = sender.Id;
sender.DataSet.SetHasBeenLoaded();
DistributionRoot DistributionRootInstance = new DistributionRoot(db,ring.TargetDate);
DistributionRootInstance.PreloadAllForAllTodayAndTomorrowMMunitsIfNotHasBeenLoaded();
BalancerUsage balancerUsage = new BalancerUsage(sender, ring, ring.TargetDate)
{
TodaysActiveMMUnitsPerMMSlot = DistributionRootInstance.TodayActiveMMUnitsPerMMSlot
};
balancerUsage.LoadActuallBalancers(sender);
RingGenerator ringGenerator = new RingGenerator(sender, ring, ring.TargetDate)
{
DistributionRootInstance = DistributionRootInstance,
TodaysBalancers = (balancerUsage.TodaysBalancersPerSender.ContainsKey(sender))
? balancerUsage.TodaysBalancersPerSender[sender] : null
};
ringGenerator.Generate();
}
开发者ID:heinzsack,项目名称:DEV,代码行数:50,代码来源:RingManger.cs
示例20: Database
/// <summary>
/// Initializes a new instance of the <see cref="Database"/> class.
/// </summary>
/// <param name="server">The server.</param>
/// <param name="binding">The binding.</param>
public Database(IServer server, IDBBinding binding)
{
Server = server;
Uri relative = binding.Uri.IsAbsoluteUri ? server.Uri.MakeRelativeUri(binding.Uri) : binding.Uri;
Uri = new Uri(server.Uri, relative);
Binding = binding;
}
开发者ID:cole2295,项目名称:mongodb-net,代码行数:12,代码来源:Database.cs
注:本文中的IServer类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论