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

C# Platform类代码示例

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

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



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

示例1: InfoService

        public InfoService (Platform platform, VLogger logger)
        {
            this.platform = platform;
            this.logger = logger;

            string homeIdPart = string.Empty;

            //if (HomeOS.Shared.Globals.HomeId != null)
            //{
            //    homeIdPart = "/" + HomeOS.Shared.Globals.HomeId;
            //}

            host = new ServiceHost(this, new Uri(HomeOS.Hub.Common.Constants.InfoServiceAddress + homeIdPart));
            host.AddServiceEndpoint(typeof(IHomeOSInfo), new WebHttpBinding(), "").Behaviors.Add(new System.ServiceModel.Description.WebHttpBehavior());
            
            var smb = new System.ServiceModel.Description.ServiceMetadataBehavior();
            smb.HttpGetEnabled = true;
            host.Description.Behaviors.Add(smb);

            try
            {
                host.Open();
            }
            catch (Exception e)
            {
                logger.Log("Could not open the service host: " + e.Message + @"
Possible issues: 1) are you running the command prompt / Visual Studio in administrator mode?      
                 2) is another instance of Platform running?
                 3) is a local copy of Gatekeeper running?
                 4) is another process occupying the InfoServicePort (51430)?");

                throw e;
            }
        }
开发者ID:donnaknew,项目名称:programmingProject,代码行数:34,代码来源:InfoService.cs


示例2: Program

 public Program(LoadedImage image, ImageMap imageMap, IProcessorArchitecture arch, Platform platform) : this()
 {
     this.Image = image;
     this.ImageMap = imageMap;
     this.Architecture = arch;
     this.Platform = platform;
 }
开发者ID:melbcat,项目名称:reko,代码行数:7,代码来源:Program.cs


示例3: ExePackLoader

        public ExePackLoader(IServiceProvider services, string filename, byte[] imgRaw)
            : base(services, filename, imgRaw)
        {
            arch = new IntelArchitecture(ProcessorMode.Real);
            platform = new MsdosPlatform(Services, arch);

            var exe = new ExeImageLoader(services, filename, imgRaw);
            this.exeHdrSize = (uint)(exe.e_cparHeader * 0x10U);
            this.hdrOffset = (uint)(exe.e_cparHeader + exe.e_cs) * 0x10U;
            ImageReader rdr = new LeImageReader(RawImage, hdrOffset);
            this.ip = rdr.ReadLeUInt16();
            this.cs = rdr.ReadLeUInt16();
            rdr.ReadLeUInt16();
            this.cbExepackHeader = rdr.ReadLeUInt16();
            this.sp = rdr.ReadLeUInt16();
            this.ss = rdr.ReadLeUInt16();
            this.cpUncompressed = rdr.ReadLeUInt16();

            int offset = ExePackHeaderOffset(exe);
            if (LoadedImage.CompareArrays(imgRaw, offset, signature, signature.Length))
            {
                relocationsOffset = 0x012D;
            }
            else if (LoadedImage.CompareArrays(imgRaw, offset, signature2, signature2.Length))
            {
                relocationsOffset = 0x0125;
            }
            else
                throw new ApplicationException("Not a recognized EXEPACK image.");
        }
开发者ID:gh0std4ncer,项目名称:reko,代码行数:30,代码来源:ExePackLoader.cs


示例4: Main

    public static void Main(string[] args)
    {
        // setup test data
        var PlatformSet = new HashSet<Platform>();
        Platform Platform0;
        PlatformSet.Add(Platform0 = new Platform());
        var ManSet = new HashSet<Man>();
        Man Man0;
        ManSet.Add(Man0 = new Man());
        Man Man1;
        ManSet.Add(Man1 = new Man());
        Man0.ceiling = Platform0;
        Man1.ceiling = Platform0;
        Man0.floor = Platform0;
        Man1.floor = Platform0;
        var DateSet = new HashSet<Date>();
        var PersonSet = new HashSet<Person>();
        Eve Eve0;
        PersonSet.Add(Eve0 = Eve.Instance);
        var WomanSet = new HashSet<Woman>();
        WomanSet.Add(Eve0);
        var EveSet = new HashSet<Eve>();
        EveSet.Add(Eve0);

        // check test data
        Contract.Assert(Contract.ForAll(ManSet, m => ManSet.Where(n => FuncClass.Above(m, n)).Count() == 1), "BelowToo");
    }
开发者ID:jshoudy,项目名称:AlloyAnalyzer,代码行数:27,代码来源:answer0.tests.cs


示例5: Build

 public SystemService Build(Platform platform)
 {
     SystemService svc = new SystemService();
     svc.Name = Name;
     svc.SyscallInfo = new SyscallInfo();
     svc.SyscallInfo.Vector = Convert.ToInt32(SyscallInfo.Vector, 16);
     if (SyscallInfo.RegisterValues != null)
     {
         svc.SyscallInfo.RegisterValues = new RegValue[SyscallInfo.RegisterValues.Length];
         for (int i = 0; i < SyscallInfo.RegisterValues.Length; ++i)
         {
             svc.SyscallInfo.RegisterValues[i] = new RegValue
             {
                 Register = platform.Architecture.GetRegister(SyscallInfo.RegisterValues[i].Register),
                 Value = Convert.ToInt32(SyscallInfo.RegisterValues[i].Value, 16),
             };
         }
     }
     else
     {
         svc.SyscallInfo.RegisterValues = new RegValue[0];
     }
     TypeLibraryLoader loader = new TypeLibraryLoader(platform, true);
     var sser = platform.CreateProcedureSerializer(loader, "stdapi");
     svc.Signature = sser.Deserialize(Signature, platform.Architecture.CreateFrame());
     svc.Characteristics = Characteristics != null ? Characteristics : DefaultProcedureCharacteristics.Instance;
     return svc;
 }
开发者ID:nemerle,项目名称:reko,代码行数:28,代码来源:SerializedService.cs


示例6: defineSourcePlatform

 void defineSourcePlatform()
 {
     if (platformSourceCombo.Items.Count > 0)
         SourcePlatform = new Platform(platformSourceCombo.SelectedItem.ToString(), GameVersion.RS2014.ToString());
     else
         SourcePlatform = new Platform(GamePlatform.None, GameVersion.None);
 }
开发者ID:aequitas,项目名称:rocksmith-custom-song-toolkit,代码行数:7,代码来源:DLCConverter.cs


示例7: LzExeUnpacker

		public LzExeUnpacker(IServiceProvider services, ExeImageLoader exe, string filename, byte [] rawImg) : base(services, filename, rawImg)
		{
            this.arch = new IntelArchitecture(ProcessorMode.Real);
            this.platform = new MsdosPlatform(services, arch);

            Validate(exe);
		}
开发者ID:killbug2004,项目名称:reko,代码行数:7,代码来源:LzExeUnpacker.cs


示例8: ChangeAniso

 static void ChangeAniso(int newLevel, Platform somePlatform = Platform.Default)
 {
     Debug.Log(System.String.Format("{0} Set AnisoLevel '{2}' @ {1} platform", logTitle, somePlatform, newLevel));
     TextureImportParams tiParams = new TextureImportParams(Actions.SetAniso, somePlatform);
     tiParams.anisoLevel = newLevel;
     SelectedChangeAnyPlatformSettings(tiParams);
 }
开发者ID:herbchow,项目名称:AssetBundler,代码行数:7,代码来源:ChangeTextureImportSettingsSample.cs


示例9: SetUp

        public void SetUp()
        {

            var appKey = "";
            var appSecret = "";
            var password = "";

            if (!string.IsNullOrEmpty(Environment.GetEnvironmentVariable("APP_KEY")))
            {

                appKey = Environment.GetEnvironmentVariable("APP_KEY");
            }

            if (!string.IsNullOrEmpty(Environment.GetEnvironmentVariable("APP_SECRET")))
            {
                appSecret = Environment.GetEnvironmentVariable("APP_SECRET");
            }

            if (!string.IsNullOrEmpty(Environment.GetEnvironmentVariable("USER_NAME")))
            {
                UserName = Environment.GetEnvironmentVariable("USER_NAME");
                ToPhone = UserName;
            }

            if (!string.IsNullOrEmpty(Environment.GetEnvironmentVariable("PASSWORD")))
            {
                password = Environment.GetEnvironmentVariable("PASSWORD");
            }
           
            RingCentralClient = new RingCentral.SDK.SDK(appKey, appSecret, ApiEndPoint,"C Sharp Test Suite", "1.0.0");
            Platform = RingCentralClient.GetPlatform();
            Platform._client = new HttpClient(MockResponseHandler) { BaseAddress = new Uri(ApiEndPoint) };
            AuthResult = Platform.Authorize(UserName, Extension, password, true);
        }
开发者ID:DiomedesDominguez,项目名称:ringcentral-csharp,代码行数:34,代码来源:TestConfiguration.cs


示例10: SceneManager

 public SceneManager(Platform platform, Engine engine, Scene startScene)
 {
     this.platform = platform;
     this.engine = engine;
     nextScene = startScene;
     sceneRenderer = new SceneRenderer(platform);
 }
开发者ID:gitter-badger,项目名称:blimey,代码行数:7,代码来源:SceneManager.cs


示例11: changeRing

    // move the inner level into the 'ring' of outer level
    // NOTE: called when the player enters the inner level
    public void changeRing()
    {
        if(camObject == null)
            camObject = GameObject.Find("Menu Camera").GetComponent<CameraScript>();
        else
            if(!plyr.rigidbody2D.isKinematic)
                camObject.jiggle = true;

        if (outer == null) {
            // there should be one and only one ring now
            outer = GameObject.Find("Platform");
            Platform plat = outer.GetComponent<Platform>();
            plat.ratio = platformRatio;

            outerPlatform = plat;
        } else {
            levelCount++;
            //if(levelCount%5==0)
                plyr.IncreaseJumps(levelCount);
            levelText.setValue (levelCount);

            Platform plat=outer.GetComponent<Platform>();
            plat.die();

            outer = inner;
            inner = null;

            outerPlatform = outer.GetComponent<Platform>();
        }
    }
开发者ID:kushalkadaba,项目名称:Uroboros,代码行数:32,代码来源:Spawner.cs


示例12: HeartbeatService

        public HeartbeatService(Platform platform, VLogger log)
        {
            this.platform = platform;
            this.logger = log;
            this.tcb = SendHeartbeat;
            this.sequenceNumber = 0;
            try
            {
                this.uri = new Uri("https://" + GetHeartbeatServiceHostString() + ":" + Constants.HeartbeatServiceSecurePort + "/" +
                                   Constants.HeartbeatServiceWcfListenerEndPointUrlSuffix);
                this.heartbeatIntervalMins = Settings.HeartbeatIntervalMins;
                if (this.heartbeatIntervalMins < Constants.MinHeartbeatIntervalInMins)
                    this.heartbeatIntervalMins = Constants.MinHeartbeatIntervalInMins;
                if (this.heartbeatIntervalMins > Constants.MaxHeartbeatIntervalInMins)
                    this.heartbeatIntervalMins = Constants.MaxHeartbeatIntervalInMins;

                this.perfCountPercentProcTime = new PerformanceCounter("Process", "% Processor Time", Process.GetCurrentProcess().ProcessName, true);
                this.perfCountWorkingSet = new PerformanceCounter("Process", "Working Set", Process.GetCurrentProcess().ProcessName, true);
            }
            catch (Exception e)
            {
                logger.Log("Platform failed failed to construct heartbeat service , Exception={0}", e.Message);
            }

        }
开发者ID:donnaknew,项目名称:programmingProject,代码行数:25,代码来源:HeartbeatService.cs


示例13: Engine

 public Engine(Platform platform)
 {
     this.Assets = new Assets (platform);
     this.InputEventSystem = new InputEventSystem (platform);
     this.DebugRenderer = new DebugRenderer (platform);
     this.PrimitiveRenderer = new PrimitiveRenderer (platform);
 }
开发者ID:gitter-badger,项目名称:blimey,代码行数:7,代码来源:Engine.cs


示例14: Mandelbrot

        public Mandelbrot( Platform platform, int width, int height )
        {
            openCLPlatform = platform;
            openCLDevices = openCLPlatform.QueryDevices(DeviceType.ALL);
            openCLContext = openCLPlatform.CreateDefaultContext();
            openCLCQ = openCLContext.CreateCommandQueue(openCLDevices[0], CommandQueueProperties.PROFILING_ENABLE);
            mandelBrotProgram = openCLContext.CreateProgramWithSource(File.ReadAllText("Mandelbrot.cl"));
            try
            {
                mandelBrotProgram.Build();
            }
            catch (OpenCLException)
            {
                string buildLog = mandelBrotProgram.GetBuildLog(openCLDevices[0]);
                MessageBox.Show(buildLog,"Build error(64 bit debug sessions in vs2008 always fail like this - debug in 32 bit or use vs2010)");
                Application.Exit();
            }
            mandelbrotKernel = mandelBrotProgram.CreateKernel("Mandelbrot");

            Left = -2.0f;
            Top = 2.0f;
            Right = 2.0f;
            Bottom = -2.0f;
            BitmapWidth = width;
            BitmapHeight = height;

            mandelbrotMemBuffer = openCLContext.CreateBuffer((MemFlags)((long)MemFlags.WRITE_ONLY), width*height*4, IntPtr.Zero);
        }
开发者ID:ctapang,项目名称:GPUCyclops,代码行数:28,代码来源:Mandelbrot.cs


示例15: ItemCatalog

        public ItemCatalog(ItemData[] items_data)
        {
            _items = new Dictionary<ulong, Item>(items_data.GetLength(0) * 2);

            foreach (ItemData itemData in items_data)
            {
                Item item;
                FileStream textureStream = new FileStream(Environment.SpecialFolder.Resources + "\\Custom\\" + itemData.UniversalTexture, FileMode.Open);
                Texture2D universalTexture = Texture2D.FromStream(Game.GraphicsInstance.GraphicsDevice, textureStream);

                switch (itemData.ClassType)
                {
                    case "Teraform.Platform":
                        item = new Platform(new Point(0, 0), universalTexture, Item.ITEM_STATE.IN_INVENTORY);
                        break;
                    case "Teraform.Block":
                        item = new Block(new Point(0,0), universalTexture, Item.ITEM_STATE.IN_INVENTORY);
                        break;
                    default:
                        throw new NotSupportedException(string.Concat("Error, item type ", itemData.ClassType ," not recognized; check the world\'s .xml file"));
                }
                item._itemId = itemData.Id;
                item._itemName = itemData.Name;
                _items.Add(itemData.Id, item);
            }
        }
开发者ID:DjScribbles,项目名称:Teraform,代码行数:26,代码来源:ItemCatalog.cs


示例16: ConfigUpdater

        public ConfigUpdater(Configuration config, VLogger log, int frequency, Delegate method, Platform platform)
        {
            this.config = config;
            this.logger = log;
            this.frequency = frequency;
            this.methodToInvoke = method;
            this.platform = platform;

            tcb = ConfigSync;
            timer = new Timer(tcb, null, 500, frequency);

            if (System.IO.Directory.Exists(temporaryZipLocation)) // creating temporary directory location for downloading and holding zips
                Utils.CleanDirectory(logger, temporaryZipLocation);
            Utils.CreateDirectory(logger, temporaryZipLocation);

            this.status = new UpdateStatus(this.frequency);

            ConfigUpdaterWebService webService = new ConfigUpdaterWebService(logger, this);

            string homeIdPart = "";
            if (!string.IsNullOrWhiteSpace(Settings.HomeId))
                homeIdPart = "/" + Settings.HomeId;

            string url = Constants.InfoServiceAddress + homeIdPart + "/config";
            serviceHost = ConfigUpdaterWebService.CreateServiceHost(webService, new Uri(url));
            serviceHost.Open();
            Utils.structuredLog(logger, "I", "ConfigUpdaterWebService initiated at " + url);

        }
开发者ID:donnaknew,项目名称:programmingProject,代码行数:29,代码来源:ConfigUpdater.cs


示例17: DataTypeBuilder

 public DataTypeBuilder(TypeFactory factory, ITypeStore store, Platform platform)
 {
     this.store = store;
     this.factory = factory;
     this.unifier = new DataTypeBuilderUnifier(factory, store);
     this.platform = platform;
 }
开发者ID:nemerle,项目名称:reko,代码行数:7,代码来源:DataTypeBuilder.cs


示例18: StartApp

		public static IApp StartApp(Platform platform)
		{
			// TODO: If the iOS or Android app being tested is included in the solution 
			// then open the Unit Tests window, right click Test Apps, select Add App Project
			// and select the app projects that should be tested.
			//
			// The iOS project should have the Xamarin.TestCloud.Agent NuGet package
			// installed. To start the Test Cloud Agent the following code should be
			// added to the FinishedLaunching method of the AppDelegate:
			//
			//    #if ENABLE_TEST_CLOUD
			//    Xamarin.Calabash.Start();
			//    #endif
			if(platform == Platform.Android)
			{
				return ConfigureApp
					.Android
					// TODO: Update this path to point to your Android app and uncomment the
					// code if the app is not included in the solution.
					//.ApkFile ("../../../Droid/bin/Debug/xamarinforms.apk")
					.StartApp();
			}

			return ConfigureApp
				.iOS
				// TODO: Update this path to point to your iOS app and uncomment the
				// code if the app is not included in the solution.
				//.AppBundle ("../../../iOS/bin/iPhoneSimulator/Debug/XamarinForms.iOS.app")
				//.DeviceIdentifier("F2CA162A-15A5-4023-B97A-427A2A9B59B7")
				//.CodesignIdentity("iPhone Developer: Rob DeRosa (VH66B6QF79)")
				.StartApp();
		}
开发者ID:xamarin,项目名称:Sport,代码行数:32,代码来源:AppInitializer.cs


示例19: defineTargetPlatform

 void defineTargetPlatform()
 {
     if (platformTargetCombo.Items.Count > 0)
         TargetPlatform = new Platform(platformTargetCombo.SelectedItem.ToString(), GameVersion.RS2014.ToString());
     else
         TargetPlatform = new Platform(GamePlatform.None, GameVersion.None);
 }
开发者ID:aequitas,项目名称:rocksmith-custom-song-toolkit,代码行数:7,代码来源:DLCConverter.cs


示例20: Level

 public Level(Texture2D background, Platform[] platform, Door d, Player p)
 {
     Background = background;
     platforms = platform;
     door = d;
     player = p;
 }
开发者ID:CaptainStack,项目名称:ColorCoded,代码行数:7,代码来源:Level.cs



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

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