本文整理汇总了C#中UUID类的典型用法代码示例。如果您正苦于以下问题:C# UUID类的具体用法?C# UUID怎么用?C# UUID使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
UUID类属于命名空间,在下文中一共展示了UUID类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: InstantMessage
public void InstantMessage(UUID target, string message)
{
OnInstantMessage(this, new GridInstantMessage(m_scene,
m_uuid, m_firstname + " " + m_lastname,
target, 0, false, message,
UUID.Zero, false, Position, new byte[0]));
}
开发者ID:N3X15,项目名称:VoxelSim,代码行数:7,代码来源:NPCAvatar.cs
示例2: Charge
public bool Charge(UUID agentID, int amount, string text, int daysUntilNextCharge, TransactionType type, string identifer, bool chargeImmediately)
{
IMoneyModule moneyModule = m_registry.RequestModuleInterface<IMoneyModule>();
if (moneyModule != null)
{
if (chargeImmediately)
{
bool success = moneyModule.Charge(agentID, amount, text, type);
if (!success)
return false;
}
IScheduleService scheduler = m_registry.RequestModuleInterface<IScheduleService>();
if (scheduler != null)
{
OSDMap itemInfo = new OSDMap();
itemInfo.Add("AgentID", agentID);
itemInfo.Add("Amount", amount);
itemInfo.Add("Text", text);
itemInfo.Add("Type", (int)type);
SchedulerItem item = new SchedulerItem("ScheduledPayment " + identifer,
OSDParser.SerializeJsonString(itemInfo), false,
DateTime.UtcNow, daysUntilNextCharge, RepeatType.days, agentID);
itemInfo.Add("SchedulerID", item.id);
scheduler.Save(item);
}
}
return true;
}
开发者ID:QueenStarfinder,项目名称:WhiteCore-Dev,代码行数:28,代码来源:ScheduledPayments.cs
示例3: FloodEffect
public void FloodEffect (ITerrainChannel map, UUID userID, float north,
float west, float south, float east, float strength)
{
float sum = 0;
float steps = 0;
int x, y;
for (x = (int)west; x < (int)east; x++) {
for (y = (int)south; y < (int)north; y++) {
if (!map.Scene.Permissions.CanTerraformLand (userID, new Vector3 (x, y, 0)))
continue;
sum += map [x, y];
steps += 1;
}
}
float avg = sum / steps;
float str = 0.1f * strength; // == 0.2 in the default client
for (x = (int)west; x < (int)east; x++) {
for (y = (int)south; y < (int)north; y++) {
if (!map.Scene.Permissions.CanTerraformLand (userID, new Vector3 (x, y, 0)))
continue;
map [x, y] = (map [x, y] * (1 - str)) + (avg * str);
}
}
}
开发者ID:Virtual-Universe,项目名称:Virtual-Universe,代码行数:28,代码来源:FlattenArea.cs
示例4: GetAppearance
public AvatarAppearance GetAppearance(UUID principalID)
{
AvatarData avatar = GetAvatar(principalID);
if (avatar == null || avatar.Data.Count == 0)
return null;
return avatar.ToAvatarAppearance(principalID);
}
开发者ID:satlanski2,项目名称:Aurora-Sim,代码行数:7,代码来源:AvatarService.cs
示例5: GetAndEnsureAppearance
public AvatarAppearance GetAndEnsureAppearance(UUID principalID, string defaultUserAvatarArchive, out bool loadedArchive)
{
loadedArchive = false;
AvatarAppearance avappearance = GetAppearance(principalID);
if (avappearance == null)
{
//Create an appearance for the user if one doesn't exist
if (defaultUserAvatarArchive != "")
{
AvatarArchive arch = m_ArchiveService.LoadAvatarArchive(defaultUserAvatarArchive, principalID);
if (arch != null)
{
avappearance = arch.Appearance;
SetAppearance(principalID, avappearance);
loadedArchive = true;
}
}
if(avappearance == null)//Set as ruth
{
avappearance = new AvatarAppearance(principalID);
SetAppearance(principalID, avappearance);
}
}
return avappearance;
}
开发者ID:emperorstarfinder,项目名称:Virtual-Universe,代码行数:25,代码来源:AvatarService.cs
示例6: Get
public AuthenticationData Get(UUID principalID)
{
if (m_DataByUUID.ContainsKey(principalID))
return m_DataByUUID[principalID];
return null;
}
开发者ID:CassieEllen,项目名称:opensim,代码行数:7,代码来源:NullAuthenticationData.cs
示例7: UserAssetURL
private string UserAssetURL(UUID userID)
{
CachedUserInfo uinfo = m_scene.CommsManager.UserProfileCacheService.GetUserDetails(userID);
if (uinfo != null)
return (uinfo.UserProfile.UserAssetURI == "") ? null : uinfo.UserProfile.UserAssetURI;
return null;
}
开发者ID:intari,项目名称:OpenSimMirror,代码行数:7,代码来源:HGAssetMapper.cs
示例8: Link
public Link( uint folderID, Guid objectGUID, uint objectFolderTypeID, DateTime dateCreated )
{
FolderID = folderID;
ObjectGUID = new UUID( objectGUID.ToByteArray() ).ToString();
ObjectFolderTypeID = objectFolderTypeID;
DateCreated = dateCreated;
}
开发者ID:CHAOS-Community,项目名称:CHAOS.Portal.MCM,代码行数:7,代码来源:Link.cs
示例9: GetFriends
public FriendInfo[] GetFriends(UUID principalID)
{
List<FriendInfo> infos = new List<FriendInfo>();
List<string> query = GD.Query("PrincipalID", principalID, m_realm, "Friend,Flags");
//These are used to get the other flags below
List<string> keys = new List<string>();
List<object> values = new List<object>();
for (int i = 0; i < query.Count; i += 2)
{
FriendInfo info = new FriendInfo();
info.PrincipalID = principalID;
info.Friend = query[i];
info.MyFlags = int.Parse(query[i + 1]);
infos.Add(info);
keys.Add("PrincipalID");
keys.Add("Friend");
values.Add(info.Friend);
values.Add(info.PrincipalID);
List<string> query2 = GD.Query(keys.ToArray(), values.ToArray(), m_realm, "Flags");
if (query2.Count >= 1) infos[infos.Count - 1].TheirFlags = int.Parse(query2[0]);
keys = new List<string>();
values = new List<object>();
}
return infos.ToArray();
}
开发者ID:x8ball,项目名称:Aurora-Sim,代码行数:30,代码来源:LocalFriendsConnector.cs
示例10: Authenticate
public string Authenticate(UUID principalID, string password, int lifetime)
{
AuthenticationData data = m_Database.Get(principalID);
string result = String.Empty;
if (data != null && data.Data != null)
{
if (data.Data.ContainsKey("webLoginKey"))
{
m_log.DebugFormat("[AUTH SERVICE]: Attempting web key authentication for PrincipalID {0}", principalID);
result = m_svcChecks["web_login_key"].Authenticate(principalID, password, lifetime);
if (result == String.Empty)
{
m_log.DebugFormat("[AUTH SERVICE]: Web Login failed for PrincipalID {0}", principalID);
}
}
if (result == string.Empty && data.Data.ContainsKey("passwordHash") && data.Data.ContainsKey("passwordSalt"))
{
m_log.DebugFormat("[AUTH SERVICE]: Attempting password authentication for PrincipalID {0}", principalID);
result = m_svcChecks["password"].Authenticate(principalID, password, lifetime);
if (result == String.Empty)
{
m_log.DebugFormat("[AUTH SERVICE]: Password login failed for PrincipalID {0}", principalID);
}
}
if (result == string.Empty)
{
m_log.DebugFormat("[AUTH SERVICE]: Both password and webLoginKey-based authentication failed for PrincipalID {0}", principalID);
}
}
else
{
m_log.DebugFormat("[AUTH SERVICE]: PrincipalID {0} or its data not found", principalID);
}
return result;
}
开发者ID:RadaSangOn,项目名称:workCore2,代码行数:35,代码来源:WebkeyOrPasswordAuthenticationService.cs
示例11: AddAvatar
public override PhysicsCharacter AddAvatar(string avName, Vector3 position, Quaternion rotation, Vector3 size,
bool isFlying, uint localID, UUID UUID)
{
BasicCharacterActor act = new BasicCharacterActor {Position = position, Flying = isFlying};
_actors.Add(act);
return act;
}
开发者ID:nathanmarck,项目名称:Aurora-Sim,代码行数:7,代码来源:BasicPhysicsScene.cs
示例12: Execute
public override string Execute(string[] args, UUID fromAgentID)
{
if (args.Length < 1)
return "Usage: parceldetails parcelID (use parcelinfo to get ID)";
int parcelID;
Parcel parcel;
// test argument that is is a valid integer, then verify we have that parcel data stored in the dictionary
if (Int32.TryParse(args[0], out parcelID) && Client.Network.CurrentSim.Parcels.TryGetValue(parcelID, out parcel))
{
// this request will update the parcels dictionary
Client.Parcels.PropertiesRequest(Client.Network.CurrentSim, parcelID, 0);
// Use reflection to dynamically get the fields from the Parcel struct
Type t = parcel.GetType();
System.Reflection.FieldInfo[] fields = t.GetFields(System.Reflection.BindingFlags.Instance | System.Reflection.BindingFlags.Public);
StringBuilder sb = new StringBuilder();
foreach (System.Reflection.FieldInfo field in fields)
{
sb.AppendFormat("{0} = {1}" + System.Environment.NewLine, field.Name, field.GetValue(parcel));
}
return sb.ToString();
}
else
{
return String.Format("Unable to find Parcel {0} in Parcels Dictionary, Did you run parcelinfo to populate the dictionary first?", args[0]);
}
}
开发者ID:3di,项目名称:3di-viewer-rei-libs,代码行数:30,代码来源:ParcelDetailsCommand.cs
示例13: RequestGodlikePowers
public void RequestGodlikePowers(
UUID agentID, UUID sessionID, UUID token, bool godLike, IClientAPI controllingClient)
{
ScenePresence sp = m_scene.GetScenePresence(agentID);
if (sp != null)
{
if (godLike == false)
{
sp.GrantGodlikePowers(agentID, sessionID, token, godLike);
return;
}
// First check that this is the sim owner
if (m_scene.Permissions.IsGod(agentID))
{
// Next we check for spoofing.....
UUID testSessionID = sp.ControllingClient.SessionId;
if (sessionID == testSessionID)
{
if (sessionID == controllingClient.SessionId)
{
//m_log.Info("godlike: " + godLike.ToString());
sp.GrantGodlikePowers(agentID, testSessionID, token, godLike);
}
}
}
else
{
if (m_dialogModule != null)
m_dialogModule.SendAlertToUser(agentID, "Request for god powers denied");
}
}
}
开发者ID:ChrisD,项目名称:opensim,代码行数:34,代码来源:GodsModule.cs
示例14: AddGroupNotice
public void AddGroupNotice(UUID requestingAgentID, UUID groupID, UUID noticeID, string fromName, string subject, string message, UUID ItemID, int AssetType, string ItemName)
{
Dictionary<string, object> sendData = new Dictionary<string, object>();
sendData["METHOD"] = "AddGroupNotice";
sendData["requestingAgentID"] = requestingAgentID;
sendData["groupID"] = groupID;
sendData["noticeID"] = noticeID;
sendData["fromName"] = fromName;
sendData["subject"] = subject;
sendData["message"] = message;
sendData["ItemID"] = ItemID;
sendData["AssetType"] = AssetType;
sendData["ItemName"] = ItemName;
string reqString = WebUtils.BuildXmlResponse(sendData);
try
{
foreach (string m_ServerURI in m_ServerURIs)
{
AsynchronousRestObjectRequester.MakeRequest("POST",
m_ServerURI + "/auroradata",
reqString);
}
}
catch (Exception e)
{
m_log.DebugFormat("[AuroraRemoteDirectoryServiceConnector]: Exception when contacting server: {0}", e.ToString());
}
}
开发者ID:mugginsm,项目名称:Aurora-Sim,代码行数:31,代码来源:RemoteGroupsServiceConnector.cs
示例15: GetUserByUUID
public UserProfileData GetUserByUUID(UUID user)
{
UserProfileData userProfile = null;
m_userProfilesByUuid.TryGetValue(user, out userProfile);
return userProfile;
}
开发者ID:AlphaStaxLLC,项目名称:taiga,代码行数:7,代码来源:TestUserDataPlugin.cs
示例16: RegisterRequest
public UUID RegisterRequest(UUID primID, UUID itemID,
string identifier)
{
DataserverRequest ds = new DataserverRequest();
ds.primID = primID;
ds.itemID = itemID;
ds.ID = UUID.Random();
ds.handle = identifier;
ds.startTime = DateTime.Now;
ds.IsCompleteAt = DateTime.Now.AddHours(1);
ds.Reply = "";
lock (DataserverRequests)
{
if (DataserverRequests.ContainsKey(identifier))
return UUID.Zero;
DataserverRequests[identifier] = ds;
}
//Make sure that the cmd handler thread is running
m_ScriptEngine.MaintenanceThread.PokeThreads ();
return ds.ID;
}
开发者ID:x8ball,项目名称:Aurora-Sim,代码行数:28,代码来源:Dataserver.cs
示例17: Charge
public bool Charge(UUID agentID, int amount, string text, int daysUntilNextCharge)
{
IMoneyModule moneyModule = m_registry.RequestModuleInterface<IMoneyModule>();
if (moneyModule != null)
{
bool success = moneyModule.Charge(agentID, amount, text);
if (!success)
return false;
IScheduleService scheduler = m_registry.RequestModuleInterface<IScheduleService>();
if (scheduler != null)
{
OSDMap itemInfo = new OSDMap();
itemInfo.Add("AgentID", agentID);
itemInfo.Add("Amount", amount);
itemInfo.Add("Text", text);
SchedulerItem item = new SchedulerItem("ScheduledPayment",
OSDParser.SerializeJsonString(itemInfo), false,
DateTime.Now.AddDays(daysUntilNextCharge) - DateTime.Now);
itemInfo.Add("SchedulerID", item.id);
scheduler.Save(item);
}
}
return true;
}
开发者ID:satlanski2,项目名称:Aurora-Sim,代码行数:25,代码来源:ScheduledCurrencyTransferModule.cs
示例18: client_OnGroupAccountDetailsRequest
/// <summary>
/// Sends the details about what
/// </summary>
/// <param name="client"></param>
/// <param name="agentID"></param>
/// <param name="groupID"></param>
/// <param name="transactionID"></param>
/// <param name="sessionID"></param>
/// <param name="currentInterval"></param>
/// <param name="intervalDays"></param>
private void client_OnGroupAccountDetailsRequest(IClientAPI client, UUID agentID, UUID groupID,
UUID transactionID, UUID sessionID, int currentInterval,
int intervalDays)
{
IGroupsModule groupsModule = client.Scene.RequestModuleInterface<IGroupsModule>();
if (groupsModule != null && groupsModule.GroupPermissionCheck(agentID, groupID, GroupPowers.Accountable))
{
IMoneyModule moneyModule = client.Scene.RequestModuleInterface<IMoneyModule>();
if (moneyModule != null)
{
int amt = moneyModule.Balance(groupID);
List<GroupAccountHistory> history = moneyModule.GetTransactions(groupID, agentID, currentInterval,
intervalDays);
history = (from h in history where h.Stipend select h).ToList();
//We don't want payments, we only want stipends which we sent to users
GroupBalance balance = moneyModule.GetGroupBalance(groupID);
client.SendGroupAccountingDetails(client, groupID, transactionID, sessionID, amt, currentInterval,
intervalDays,
Util.BuildYMDDateString(
balance.StartingDate.AddDays(-currentInterval*intervalDays)),
history.ToArray());
}
else
client.SendGroupAccountingDetails(client, groupID, transactionID, sessionID, 0, currentInterval,
intervalDays,
"Never", new GroupAccountHistory[0]);
}
}
开发者ID:BogusCurry,项目名称:WhiteCore-Dev,代码行数:38,代码来源:GroupMoneyModule.cs
示例19: CheckToken
public bool CheckToken(UUID principalID, string token, int lifetime)
{
if (m_Tokens.ContainsKey(principalID))
return m_Tokens[principalID] == token;
return false;
}
开发者ID:CassieEllen,项目名称:opensim,代码行数:7,代码来源:NullAuthenticationData.cs
示例20: Init
public void Init()
{
TestHelper.InMethod();
scene = SceneSetupHelpers.SetupScene("Neighbour x", UUID.Random(), 1000, 1000);
scene2 = SceneSetupHelpers.SetupScene("Neighbour x+1", UUID.Random(), 1001, 1000);
scene3 = SceneSetupHelpers.SetupScene("Neighbour x-1", UUID.Random(), 999, 1000);
ISharedRegionModule interregionComms = new LocalSimulationConnectorModule();
interregionComms.Initialise(new IniConfigSource());
interregionComms.PostInitialise();
SceneSetupHelpers.SetupSceneModules(scene, new IniConfigSource(), interregionComms);
SceneSetupHelpers.SetupSceneModules(scene2, new IniConfigSource(), interregionComms);
SceneSetupHelpers.SetupSceneModules(scene3, new IniConfigSource(), interregionComms);
agent1 = UUID.Random();
agent2 = UUID.Random();
agent3 = UUID.Random();
random = new Random();
sog1 = NewSOG(UUID.Random(), scene, agent1);
sog2 = NewSOG(UUID.Random(), scene, agent1);
sog3 = NewSOG(UUID.Random(), scene, agent1);
//ulong neighbourHandle = Utils.UIntsToLong((uint)(neighbourx * Constants.RegionSize), (uint)(neighboury * Constants.RegionSize));
region1 = scene.RegionInfo.RegionHandle;
region2 = scene2.RegionInfo.RegionHandle;
region3 = scene3.RegionInfo.RegionHandle;
}
开发者ID:HGExchange,项目名称:opensim,代码行数:28,代码来源:ScenePresenceTests.cs
注:本文中的UUID类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论