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

C# Oid类代码示例

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

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



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

示例1: Pkcs9ContentType

		internal Pkcs9ContentType (string contentType) 
		{
			(this as AsnEncodedData).Oid = new Oid (oid, friendlyName);
			_contentType = new Oid (contentType);
			RawData = Encode ();
			_encoded = null;
		}
开发者ID:Profit0004,项目名称:mono,代码行数:7,代码来源:Pkcs9ContentType.cs


示例2: CreateTestProject

 private static void CreateTestProject(bool useOAuthEndpoints)
 {
     V1Connector connector;
     if (useOAuthEndpoints)
     {
         connector = V1Connector.WithInstanceUrl(ConfigurationManager.AppSettings.Get("V1Url"))
             .WithUserAgentHeader("IntegrationTests", "1.0")
             .WithAccessToken(ConfigurationManager.AppSettings.Get("V1AccessToken"))
             .UseOAuthEndpoints()
             .Build();
     }
     else
     {
         connector = V1Connector.WithInstanceUrl(ConfigurationManager.AppSettings.Get("V1Url"))
             .WithUserAgentHeader("IntegrationTests", "1.0")
             .WithAccessToken(ConfigurationManager.AppSettings.Get("V1AccessToken"))
             .Build();
     }
     var services = new Services(connector);
     var assetType = services.Meta.GetAssetType("Scope");
     var nameAttribute = assetType.GetAttributeDefinition("Name");
     var projectId = services.GetOid("Scope:0");
     var newAsset = services.New(assetType, projectId);
     newAsset.SetAttributeValue(nameAttribute, TestProjectName);
     services.Save(newAsset);
     _testProjectId = newAsset.Oid.Momentless;
 }
开发者ID:xtremeRacer,项目名称:VersionOne.SDK.NET.APIClient,代码行数:27,代码来源:IntegrationTestsHelper.cs


示例3: SearchIntermediaNodeDataEventArgs

 /// <summary>
 /// Initializes a new instance of the 'SearchIntermediaNodeDataEventArgs' class.
 /// </summary>
 /// <param name="parentNodeOid">Parent node Oid.</param>
 /// <param name="nodeId">Node identifier.</param>
 /// <param name="completeOidPath">Oids list and its Ids of the complete path for a node.</param>
 public SearchIntermediaNodeDataEventArgs(Oid parentNodeOid, string nodeId, List<KeyValuePair<string, Oid>> completeOidPath)
 {
     mParentNodeOid = parentNodeOid;
     mNodeId = nodeId;
     mCompleteOidPath = completeOidPath;
     mLastBlock = true;
 }
开发者ID:sgon1853,项目名称:UPM_MDD_Thesis,代码行数:13,代码来源:SearchIntermediaNodeEventArgs.cs


示例4: ObjectViewModel

 public ObjectViewModel(object obj, FieldViewModel parentView, int arrayIndex, bool encodedOid, SessionBase session)
   : base(parentView, true)
 {
   m_session = session;
   if (encodedOid)
   {
     if (obj.GetType() == typeof(UInt64))
     {
       m_objectId = (UInt64)obj;
       m_objectAsString = "[" + arrayIndex.ToString() + "] " + new Oid(m_objectId).ToString();
     }
     else
     {
       Oid oid = new Oid(parentView.ParentId);
       oid = new Oid(oid.Database, (UInt32)obj);
       m_objectId = oid.Id;
       m_objectAsString = "[" + arrayIndex.ToString() + "] " + new OidShort(oid.IdShort).ToString();
     }
   }
   else
   {
     IOptimizedPersistable pObj = obj as IOptimizedPersistable;
     if (pObj == null)
       session.GlobalObjWrapperGet(obj, out pObj);
     if (pObj != null)
       m_objectId = pObj.Id;
     m_session = session;
     if (pObj != null && pObj.WrappedObject != obj)
       m_objectAsString = "[" + arrayIndex.ToString() + "] " + pObj.WrappedObject.ToString() + " " + new Oid(pObj.Id);
     else
       m_objectAsString = "[" + arrayIndex.ToString() + "] " + obj.ToString();
   }
 }
开发者ID:VelocityDB,项目名称:VelocityDB,代码行数:33,代码来源:ObjectViewModel.cs


示例5: GetData

        /// <summary>
        /// Fills and return a DataSet processing the data set file and starting with the oid.
        /// </summary>
        /// <param name="oid">Oid of the instance.</param>
        /// <param name="dataSetFile">Path of the data set file.</param>
        /// <returns>A DataSet object with the suitable data.</returns>
        public static DataSet GetData(Oid oid, string dataSetFile)
        {
            DataSet lDataSet = new DataSet();
            try
            {
                lDataSet.ReadXmlSchema(dataSetFile);
            }
            catch (Exception e)
            {
                object[] lArgs = new object[1];
                lArgs[0] = dataSetFile;
                string lErrorMessage = CultureManager.TranslateStringWithParams(LanguageConstantKeys.L_ERROR_DATASET_GENERICLOAD, LanguageConstantValues.L_ERROR_DATASET_GENERICLOAD, lArgs);

                Exception newException = new Exception(lErrorMessage, e);
                throw newException;
            }

            // Analize the Tables in the DataSet.
            DataTable lStartingClass = GetDataTable(lDataSet, oid.ClassName);

            string lDisplaySet = GetDisplaySet(lStartingClass);
            DataTable rootInstance = Logics.Logic.ExecuteQueryInstance(Logics.Logic.Agent, oid, lDisplaySet);
            // Add data to DataSet.
            lStartingClass.Merge(rootInstance);

            // Process Table relationships.
            ProcessTableRelationships(lDataSet, lStartingClass, oid);

            return lDataSet;
        }
开发者ID:sgon1853,项目名称:UPM_MDD_Thesis,代码行数:36,代码来源:PrintToDataSets.cs


示例6: GetNextNodeDataBlockEventArgs

 /// <summary>
 /// Initializes a new instance of the 'GetNextNodeDataBlockEventArgs' class.
 /// </summary>
 /// <param name="nodeId">Node identifier.</param>
 /// <param name="lastOid">Last Oid.</param>
 /// <param name="completeOidPath">Oids list and its Ids of the complete path for a node.</param>
 public GetNextNodeDataBlockEventArgs(string nodeId, Oid lastOid, List<KeyValuePair<string, Oid>> completeOidPath)
 {
     NodeId = nodeId;
     mLastOid = lastOid;
     mCompleteOidPath = completeOidPath;
     mLastBlock = true;
 }
开发者ID:sgon1853,项目名称:UPM_MDD_Thesis,代码行数:13,代码来源:GetNextNodeDataBlockEventArgs.cs


示例7: LookupUnknownOid

        public static void LookupUnknownOid()
        {
            Oid oid = new Oid(Bogus_Name);

            Assert.Equal(Bogus_Name, oid.Value);
            Assert.Null(oid.FriendlyName);
        }
开发者ID:ChuangYang,项目名称:corefx,代码行数:7,代码来源:Oid.cs


示例8: TestDecode

        public void TestDecode()
        {
            const string hex = "4a7067c30a57000000008ecb";
            var oid = new Oid(hex);

            Assert.AreEqual(hex, oid.ToString());
        }
开发者ID:gaoninggn,项目名称:mongodb-csharp,代码行数:7,代码来源:TestOid.cs


示例9: LookupOidByFriendlyName_Ctor

        public static void LookupOidByFriendlyName_Ctor(string oidValue, string friendlyName)
        {
            Oid oid = new Oid(friendlyName);

            Assert.Equal(oidValue, oid.Value);
            Assert.Equal(friendlyName, oid.FriendlyName);
        }
开发者ID:ChuangYang,项目名称:corefx,代码行数:7,代码来源:Oid.cs


示例10: TestFollowNonReference

        public void TestFollowNonReference(){
            var id = new Oid("BAD067c30a57000000008ecb");
            var rf = new DBRef("refs", id);

            var target = DB.FollowReference(rf);
            Assert.IsNull(target, "FollowReference returned wasn't null");
        }
开发者ID:jango2015,项目名称:MongoDB_Client_.Net,代码行数:7,代码来源:TestDatabase.cs


示例11: X509KeyUsageExtension

		public X509KeyUsageExtension (X509KeyUsageFlags keyUsages, bool critical)
		{
			_oid = new Oid (oid, friendlyName);
			base.Critical = critical;
			_keyUsages = GetValidFlags (keyUsages);
			RawData = Encode ();
		}
开发者ID:runefs,项目名称:Marvin,代码行数:7,代码来源:X509KeyUsageExtension.cs


示例12: Pkcs9AttributeObject

		public Pkcs9AttributeObject (Oid oid, byte[] encodedData) 
		{
			if (oid == null)
				throw new ArgumentNullException ("oid");
			base.Oid = oid;
			RawData = encodedData;
		}
开发者ID:nlhepler,项目名称:mono,代码行数:7,代码来源:Pkcs9Attribute.cs


示例13: PublicKey

 public PublicKey(Oid oid, AsnEncodedData parameters, AsnEncodedData keyValue)
 {
     _oid = new Oid(oid);
     EncodedParameters = new AsnEncodedData(parameters);
     EncodedKeyValue = new AsnEncodedData(keyValue);
     return;
 }
开发者ID:johnhhm,项目名称:corefx,代码行数:7,代码来源:PublicKey.cs


示例14: TestStrStrConstructor

        public static void TestStrStrConstructor()
        {
            Oid oid;

            // No validation at all.
            oid = new Oid((string)null, (string)null);
            Assert.Equal(null, oid.FriendlyName);
            Assert.Equal(null, oid.Value);

            // Can omit friendly-name - FriendlyName property demand-computes it.
            oid = new Oid(SHA1_Oid, (string)null);
            Assert.Equal(SHA1_Name, oid.FriendlyName);
            Assert.Equal(SHA1_Oid, oid.Value);

            oid = new Oid(SHA1_Oid, "BOGUS-NAME");
            Assert.Equal("BOGUS-NAME", oid.FriendlyName);
            Assert.Equal(SHA1_Oid, oid.Value);

            // Can omit oid, Value property does no on-demand conversion.
            oid = new Oid((string)null, SHA1_Name);
            Assert.Equal(SHA1_Name, oid.FriendlyName);
            Assert.Equal(null, oid.Value);

            oid = new Oid("BOGUS-OID", SHA1_Name);
            Assert.Equal(SHA1_Name, oid.FriendlyName);
            Assert.Equal("BOGUS-OID", oid.Value);


            return;
        }
开发者ID:johnhhm,项目名称:corefx,代码行数:30,代码来源:Oid.cs


示例15: TestFormatJ

        public void TestFormatJ()
        {
            const string hex = "4a7067c30a57000000008ecb";
            var oid = new Oid(hex);

            Assert.AreEqual("\"" + hex + "\"", oid.ToString("J"));
        }
开发者ID:gaoninggn,项目名称:mongodb-csharp,代码行数:7,代码来源:TestOid.cs


示例16: run

		public object run()
		{
			try {				
				Oid krb5Oid = new Oid (_mech);
				GSSManager manager = GSSManager.getInstance ();
				GSSName clientName = 
					manager.createName(_clientName, GSSName__Finals.NT_USER_NAME);
				GSSCredential clientCreds =
					manager.createCredential(clientName,
					GSSContext__Finals.INDEFINITE_LIFETIME,
					krb5Oid,
					GSSCredential__Finals.INITIATE_ONLY);

//				try {
					GSSName serverName = manager.createName (_name, GSSName__Finals.NT_HOSTBASED_SERVICE, krb5Oid);
					GSSContext context = manager.createContext (serverName, krb5Oid, clientCreds, GSSContext__Finals.INDEFINITE_LIFETIME);

					context.requestMutualAuth(true);  
					context.requestConf (_encryption);
					if (!_encryption || _signing)
						context.requestInteg (!_encryption || _signing); 
					context.requestCredDeleg (_delegation);

					return context;
//				}
//				finally {
//					// Calling this throws GSSException: Operation unavailable...
//					clientCreds.dispose();
//				}
			}
			catch (GSSException e) {
				throw new PrivilegedActionException (e);
			}
		}
开发者ID:nickchal,项目名称:pash,代码行数:34,代码来源:CreateContextPrivilegedAction.cs


示例17: X509Extension

		public X509Extension (Oid oid, byte[] rawData, bool critical)
		{
			if (oid == null)
				throw new ArgumentNullException ("oid");
			Oid = oid;
			RawData = rawData;
			_critical = critical;
		}
开发者ID:runefs,项目名称:Marvin,代码行数:8,代码来源:X509Extension.cs


示例18: Oid_StringString_NullValue

        public static void Oid_StringString_NullValue(string friendlyName)
        {
            // Can omit oid, Value property does no on-demand conversion.
            Oid oid = new Oid(null, friendlyName);

            Assert.Null(oid.Value);
            Assert.Equal(friendlyName, oid.FriendlyName);
        }
开发者ID:ChuangYang,项目名称:corefx,代码行数:8,代码来源:Oid.cs


示例19: Oid_StringString_NullFriendlyName

        public static void Oid_StringString_NullFriendlyName(string oidValue, string expectedFriendlyName)
        {
            // Can omit friendly-name - FriendlyName property demand-computes it.
            Oid oid = new Oid(oidValue, null);

            Assert.Equal(oidValue, oid.Value);
            Assert.Equal(expectedFriendlyName, oid.FriendlyName);
        }
开发者ID:ChuangYang,项目名称:corefx,代码行数:8,代码来源:Oid.cs


示例20: Oid_StringString_BothNull

        public static void Oid_StringString_BothNull()
        {
            // No validation at all.
            Oid oid = new Oid(null, null);

            Assert.Null(oid.Value);
            Assert.Null(oid.FriendlyName);
        }
开发者ID:ChuangYang,项目名称:corefx,代码行数:8,代码来源:Oid.cs



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
C# OidGroup类代码示例发布时间:2022-05-24
下一篇:
C# OffsetItem类代码示例发布时间: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