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


C# UUID.Equals方法代码示例

本文整理汇总了C#中UUID.Equals方法的典型用法代码示例。如果您正苦于以下问题:C# UUID.Equals方法的具体用法?C# UUID.Equals怎么用?C# UUID.Equals使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在UUID的用法示例。


在下文中一共展示了UUID.Equals方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: GetListeners

        /// <summary>
        /// Get listeners matching the input parameters.
        /// </summary>
        /// <remarks>
        /// Theres probably a more clever and efficient way to do this, maybe
        /// with regex.
        /// PM2008: Ha, one could even be smart and define a specialized
        /// Enumerator.
        /// </remarks>
        /// <param name="itemID"></param>
        /// <param name="channel"></param>
        /// <param name="name"></param>
        /// <param name="id"></param>
        /// <param name="msg"></param>
        /// <returns></returns>
        public List<ListenerInfo> GetListeners(UUID itemID, int channel,
                string name, UUID id, string msg)
        {
            List<ListenerInfo> collection = new List<ListenerInfo>();

            lock (m_listeners)
            {
                List<ListenerInfo> listeners;
                if (!m_listeners.TryGetValue(channel, out listeners))
                {
                    return collection;
                }

                foreach (ListenerInfo li in listeners)
                {
                    if (!li.IsActive())
                    {
                        continue;
                    }
                    if (!itemID.Equals(UUID.Zero) &&
                            !li.GetItemID().Equals(itemID))
                    {
                        continue;
                    }
                    if (li.GetName().Length > 0 && (
                        ((li.RegexBitfield & OS_LISTEN_REGEX_NAME) != OS_LISTEN_REGEX_NAME && !li.GetName().Equals(name)) ||
                        ((li.RegexBitfield & OS_LISTEN_REGEX_NAME) == OS_LISTEN_REGEX_NAME && !Regex.IsMatch(name, li.GetName()))
                    ))
                    {
                        continue;
                    }
                    if (!li.GetID().Equals(UUID.Zero) && !li.GetID().Equals(id))
                    {
                        continue;
                    }
                    if (li.GetMessage().Length > 0 && (
                        ((li.RegexBitfield & OS_LISTEN_REGEX_MESSAGE) != OS_LISTEN_REGEX_MESSAGE && !li.GetMessage().Equals(msg)) ||
                        ((li.RegexBitfield & OS_LISTEN_REGEX_MESSAGE) == OS_LISTEN_REGEX_MESSAGE && !Regex.IsMatch(msg, li.GetMessage()))
                    ))
                    {
                        continue;
                    }
                    collection.Add(li);
                }
            }
            return collection;
        }
开发者ID:AkiraSonoda,项目名称:akisim,代码行数:62,代码来源:WorldCommModule.cs

示例2: GetListeners

        // Theres probably a more clever and efficient way to
        // do this, maybe with regex.
        public List<ListenerInfo> GetListeners(UUID itemID, int channel, string name, UUID id, string msg)
        {
            List<ListenerInfo> collection = new List<ListenerInfo>();

            lock (m_listeners)
            {
                List<ListenerInfo> listeners;
                if (!m_listeners.TryGetValue(channel, out listeners))
                {
                    return collection;
                }

                collection.AddRange(from li in listeners
                                    where li.IsActive()
                                    where itemID.Equals(UUID.Zero) || li.GetItemID().Equals(itemID)
                                    where li.GetName().Length <= 0 || li.GetName().Equals(name)
                                    where li.GetName().Length <= 0 || ((li.RegexBitfield & OS_LISTEN_REGEX_NAME) != OS_LISTEN_REGEX_NAME && li.GetName().Equals(name)) ||
                                                                      ((li.RegexBitfield & OS_LISTEN_REGEX_NAME) == OS_LISTEN_REGEX_NAME && Regex.IsMatch(name, li.GetName()))
                                    where li.GetMessage().Length <= 0 || ((li.RegexBitfield & OS_LISTEN_REGEX_MESSAGE) != OS_LISTEN_REGEX_MESSAGE && li.GetMessage().Equals(msg)) ||
                                                                         ((li.RegexBitfield & OS_LISTEN_REGEX_MESSAGE) == OS_LISTEN_REGEX_MESSAGE && Regex.IsMatch(msg, li.GetMessage()))
                                    where li.GetID().Equals(UUID.Zero) || li.GetID().Equals(id)
                                    where li.GetMessage().Length <= 0 || li.GetMessage().Equals(msg)
                                    select li);
            }
            return collection;
        }
开发者ID:emperorstarfinder,项目名称:Virtual-Universe,代码行数:28,代码来源:WorldCommModule.cs

示例3: ExportAsset

 ///
 /// Used in DeleteToInventory
 ///
 protected override void ExportAsset(UUID agentID, UUID assetID)
 {
     if (!assetID.Equals(UUID.Zero))
         UploadInventoryItem(agentID, AssetType.Unknown, assetID, "", 0);
     else
         m_log.Debug("[HGScene]: Scene.Inventory did not create asset");
 }
开发者ID:Michelle-Argus,项目名称:opensim,代码行数:10,代码来源:HGInventoryAccessModule.cs

示例4: ExportAsset

        ///
        /// Used in DeleteToInventory
        ///
        protected override void ExportAsset(UUID agentID, UUID assetID)
        {
            if (!assetID.Equals(UUID.Zero))
            {
                InventoryItemBase item = new InventoryItemBase();
                item.Owner = agentID;
                item.AssetType = (int)AssetType.Unknown;
                item.AssetID = assetID;
                item.Name = String.Empty;

                PostInventoryAsset(item, 0);
            }
            else
            {
                m_log.Debug("[HGScene]: Scene.Inventory did not create asset");
            }
        }
开发者ID:emperorstarfinder,项目名称:Opensim2,代码行数:20,代码来源:HGInventoryAccessModule.cs

示例5: CityBuilding

        /// <summary>
        /// Construct the building class instance from the given properties.
        /// </summary>
        /// <param name="type" type="BuildingType">type</param>
        /// <param name="plot">The plot of land this building stands on, note it might be bigger than the
        /// actual buildings footprint, for example if it is part of a larger complex, limit the size of
        /// buildings to have a footprint of no more than 100 square meters.</param>
        /// <param name="flags"></param>
        /// <param name="owner">The owner of the building either a user, or company (group of companies) own buildings.</param>
        /// <param name="seed"></param>
        /// <param name="height">The height in floors of the building, not each floor is approximately 3 meters in size
        /// and thus buildings are limited to a maximum height of 100 floors.</param>
        public CityBuilding( BuildingType type, BuildingPlot plot, BuildingFlags flags, 
            UUID owner, IScene scene, string name ):base(owner,new Vector3(plot.xpos,21,plot.ypos),
            Quaternion.Identity, PrimitiveBaseShape.CreateBox(), name, scene)
        {
            //  Start the process of constructing a building given the parameters specified. For
            // truly random buildings change the following value (6) too another number, this is
            // used to allow for the buildings to be fairly fixed during research and development.
            buildingSeed = 6; // TODO FIX ACCESS TO THE CityModule.randomValue(n) code.
            buildingType = type;
            buildingPlot = plot;
            buildingFlags = flags;
            //  Has a valid owner been specified, if not use the default library owner (i think) of the zero uuid.
            if (!owner.Equals(UUID.Zero))
                buildingOwner = owner;
            else
                buildingOwner = UUID.Zero;

            //  Generate a unique value for this building and it's own group if it's part of a complex,
            // otherwise use the zero uuid for group (perhaps it should inherit from the city?)
            buildingUUID = UUID.Random();
            buildingGUID = UUID.Random();

            buildingCenter = new Vector3((plot.xpos + plot.width / 2), 21, (plot.ypos + plot.depth) / 2);
            if (name.Length > 0)
                buildingName = name;
            else
                buildingName = "Building" + type.ToString();
            //  Now that internal variables that are used by other methods have been set construct
            // the building based on the type, plot, flags and seed given in the parameters.
            switch (type)
            {
                case BuildingType.BUILDING_GENERAL:
                    OpenSim.Framework.MainConsole.Instance.Output("Building Type GENERAL", log4net.Core.Level.Info);
                    createBlocky();
                    break;
                case BuildingType.BUILDING_LOCALE:
                    /*
                    switch ( CityModule.randomValue(8) )
                    {
                        case 0:
                            OpenSim.Framework.MainConsole.Instance.Output("Locale general.", log4net.Core.Level.Info);
                            createSimple();
                            break;
                        case 1:
                            OpenSim.Framework.MainConsole.Instance.Output("locale 1", log4net.Core.Level.Info);
                            createBlocky();
                            break;
                    }
                    */
                    break;
                case BuildingType.BUILDING_CIVIL:
                    createTower();
                    break;
                case BuildingType.BUILDING_MILITARY:
                    break;
                case BuildingType.BUILDING_HEALTHCARE:
                    break;
                case BuildingType.BUILDING_SPORTS:
                    break;
                case BuildingType.BUILDING_ENTERTAINMENT:
                    break;
                case BuildingType.BUILDING_EDUCATION:
                    break;
                case BuildingType.BUILDING_RELIGIOUS:
                    break;
                case BuildingType.BUILDING_MUSEUM:
                    break;
                case BuildingType.BUILDING_POWERSTATION:
                    break;
                case BuildingType.BUILDING_MINEOILGAS:
                    break;
                case BuildingType.BUILDING_ZOOLOGICAL:
                    break;
                case BuildingType.BUILDING_CEMETARY:
                    break;
                case BuildingType.BUILDING_PRISON:
                    break;
                case BuildingType.BUILDING_AGRICULTURAL:
                    break;
                case BuildingType.BUILDING_RECREATION:
                    break;
                default:
                    createSimple();
                    break;
            }
        }
开发者ID:RevolutionSmythe,项目名称:CityModule,代码行数:98,代码来源:CityBuilding.cs

示例6: getNeighbourCol

 private string getNeighbourCol(UUID x, UUID y, int width, string infinity)
 {
     if (x.Equals(y))
         return getCol("0", width);
     if (neighbourVectors[y].ContainsKey(x)) {
         float v = neighbourVectors[y][x].Dist;
         string format = "{0:##.";
         for (int i = 0; i < width - (v < 10f ? 3 : 4); i++)
             format += "#";
         format += "}";
         return getCol(String.Format(format, v), width);
     }
     return getCol(infinity, width);
 }
开发者ID:JohnMcCaffery,项目名称:RoutingIsland,代码行数:14,代码来源:DVNode.cs

示例7: GetListeners

        // Theres probably a more clever and efficient way to
        // do this, maybe with regex.
        // PM2008: Ha, one could even be smart and define a specialized Enumerator.
        public List<ListenerInfo> GetListeners(UUID itemID, int channel, string name, UUID id, string msg)
        {
            List<ListenerInfo> collection = new List<ListenerInfo>();

            lock (m_listeners)
            {
                List<ListenerInfo> listeners;
                if (!m_listeners.TryGetValue(channel,out listeners))
                {
                    return collection;
                }

                foreach (ListenerInfo li in listeners)
                {
                    if (!li.IsActive())
                    {
                        continue;
                    }
                    if (!itemID.Equals(UUID.Zero) && !li.GetItemID().Equals(itemID))
                    {
                        continue;
                    }
                    if (li.GetName().Length > 0 && !li.GetName().Equals(name))
                    {
                        continue;
                    }
                    if (!li.GetID().Equals(UUID.Zero) && !li.GetID().Equals(id))
                    {
                        continue;
                    }
                    if (li.GetMessage().Length > 0 && !li.GetMessage().Equals(msg))
                    {
                        continue;
                    }
                    collection.Add(li);
                }
            }
            return collection;
        }
开发者ID:NickyPerian,项目名称:Aurora,代码行数:42,代码来源:WorldCommModule.cs

示例8: IsLocal

        private bool IsLocal(UUID groupID, out string serviceLocation, out string name)
        {
            serviceLocation = string.Empty;
            name = string.Empty;
            if (groupID.Equals(UUID.Zero))
                return true;

            ExtendedGroupRecord group = m_LocalGroupsConnector.GetGroupRecord(UUID.Zero.ToString(), groupID, string.Empty);
            if (group == null)
            {
                //m_log.DebugFormat("[XXX]: IsLocal? group {0} not found -- no.", groupID);
                return false;
            }

            serviceLocation = group.ServiceLocation;
            name = group.GroupName;
            bool isLocal = (group.ServiceLocation == string.Empty);
            //m_log.DebugFormat("[XXX]: IsLocal? {0}", isLocal);
            return isLocal;
        }
开发者ID:BogusCurry,项目名称:arribasim-dev,代码行数:20,代码来源:GroupsServiceHGConnectorModule.cs

示例9: Authorize

 public bool Authorize(IOwned entity, UUID id)
 {
     if (id.Equals(_ownerID)) {
         //Reset the timeout every time the user makes a change
         _updated = true;
         JM726.Lib.Static.Util.Wake(this);
         return true;
     }
     return false;
 }
开发者ID:JohnMcCaffery,项目名称:RoutingIsland,代码行数:10,代码来源:LockedPermissions.cs

示例10: RemoveBoard

 public void RemoveBoard(UUID board)
 {
     _boards = _boards.Where(oldBoard => !board.Equals(oldBoard.ID));
 }
开发者ID:JohnMcCaffery,项目名称:RoutingIsland,代码行数:4,代码来源:VNode.cs

示例11: OnChange

 /// <summary>
 /// Override this to change what happens when something changes in the topology.
 /// Changes are:
 /// A link is added.
 /// A link is removed.
 /// The weight of a link changes.
 /// 
 /// The default behaviour is to run the algorithm from every node.
 /// </summary>
 protected virtual void OnChange(string msg, UUID link, Parameters parameters, bool visualise)
 {
     foreach (DijkstraNode n in this.GetAllNodes<DijkstraNode>()) {
         if (n.GetType().Equals(_dijkstraType) && !Links.ContainsKey(n.ID) || !link.Equals(Links[n.ID].ID) || !Links[n.ID].IsBidirectional)
             n.RunAlgorithm("Running algorithm from " + n.Name + " because " + msg + ".", null, n.Equals(VisualisedNode));
     }
 }
开发者ID:JohnMcCaffery,项目名称:RoutingIsland,代码行数:16,代码来源:DijkstraNode.cs

示例12: GetListeners

        // Theres probably a more clever and efficient way to
        // do this, maybe with regex.
        // PM2008: Ha, one could even be smart and define a specialized Enumerator.
        public List<ListenerInfo> GetListeners(UUID itemID, int channel, string name, UUID id, string msg)
        {
            List<ListenerInfo> collection = new List<ListenerInfo>();

            lock (m_listeners)
            {
                List<ListenerInfo> listeners;
                if (!m_listeners.TryGetValue(channel, out listeners))
                {
                    return collection;
                }

                collection.AddRange(from li in listeners
                                    where li.IsActive()
                                    where itemID.Equals(UUID.Zero) || li.GetItemID().Equals(itemID)
                                    where li.GetName().Length <= 0 || li.GetName().Equals(name)
                                    where li.GetID().Equals(UUID.Zero) || li.GetID().Equals(id)
                                    where li.GetMessage().Length <= 0 || li.GetMessage().Equals(msg)
                                    select li);
            }
            return collection;
        }
开发者ID:nathanmarck,项目名称:Aurora-Sim,代码行数:25,代码来源:WorldCommModule.cs

示例13: RezObject

        ///
        /// RezObject
        ///
        public override SceneObjectGroup RezObject(IClientAPI remoteClient, UUID itemID, Vector3 RayEnd, Vector3 RayStart,
                                                   UUID RayTargetID, byte BypassRayCast, bool RayEndIsIntersection,
                                                   bool RezSelected, bool RemoveItem, UUID fromTaskID, bool attachment)
        {
            //m_log.DebugFormat("[HGScene] RezObject itemID={0} fromTaskID={1}", itemID, fromTaskID);

            if (fromTaskID.Equals(UUID.Zero))
            {
                CachedUserInfo userInfo = CommsManager.UserProfileCacheService.GetUserDetails(remoteClient.AgentId);
                if (userInfo != null)
                {
                    if (userInfo.RootFolder != null)
                    {
                        InventoryItemBase item = userInfo.RootFolder.FindItem(itemID);
                        if (item == null)
                        { // Fetch the item
                            item = new InventoryItemBase();
                            item.Owner = remoteClient.AgentId;
                            item.ID = itemID;
                            item = m_assMapper.Get(item, userInfo.RootFolder.ID, userInfo);
                        }
                        if (item != null)
                        {
                            m_assMapper.Get(item.AssetID, remoteClient.AgentId);

                        }
                    }
                }
            }

            // OK, we're done fetching. Pass it up to the default RezObject
            return base.RezObject(remoteClient, itemID, RayEnd, RayStart, RayTargetID, BypassRayCast, RayEndIsIntersection, 
                                  RezSelected, RemoveItem, fromTaskID, attachment);

        }
开发者ID:ChrisD,项目名称:opensim,代码行数:38,代码来源:HGScene.Inventory.cs

示例14: OtherEnd

 /// <inheritdoc />
 public UUID OtherEnd(UUID n)
 {
     if (!n.Equals(To.ID) && !n.Equals(From.ID))
         throw new Exception("Cannot return other end. Parameter 'node' must be connected to link.");
     return From.ID.Equals(n) ? To.ID : From.ID;
 }
开发者ID:JohnMcCaffery,项目名称:RoutingIsland,代码行数:7,代码来源:VLink.cs

示例15: Authorize

 private bool Authorize(string command, UUID id)
 {
     if (!id.Equals(m_god.PrincipalID) && !id.Equals(UUID.Zero)) {
         UserAccount attempt = m_scene.UserAccountService.GetUserAccount(UUID.Zero, id);
         m_log.Warn("Can't execute " + command + " on " + Name + ". " + (attempt != null ? attempt.FirstName + " " + attempt.LastName + " is not " : "Not ") + "authorized.");
         return false;
     }
     return true;
 }
开发者ID:sanyaade-research-hub,项目名称:XMRM,代码行数:9,代码来源:Script.cs


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